Forcing XML parsing to abort

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
rroy2
Participant
Posts: 21
Joined: Thu Jan 03, 2008 4:16 pm

Forcing XML parsing to abort

Post by rroy2 »

Hi,

I am parsing an XML file using the XML Input stage and reading the file through an external source stage.

The XML gets parsed according to the xpaths I have given.

But I want the Job to abort in case there is any error in the XML format e.g. the closing tags are missing for a tag which we are trying to read (or it could be an error with any tag). I want the job to fail and give a fatal error.

In the XML input stage I tried to
-- set the 'schema validation level' to strict AND
-- set the Transformation Error Mappings to 'Fatal'

but still it parsed the file and the job didnt abort, and I got blank as parsed value for that tag (and subsequent tags).

How can we force an abort in this situation.

Thanks
roy
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Report it to whoever you have your support with...there may be specific conditions that need to be qualified, but I reported and made available a reproduction of a validation anomaly in 8.x..... it may be fixed already. What you are doing is perfectly fine and should work correctly, allowing you to send the offending XML down an alternate link.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply