Forcing XML parsing to abort
Posted: Mon May 05, 2008 8:50 pm
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
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