One Star

Validate XML file with XSD

My job is validating an XML file with an XSD as following : tXSDValidator--->tMap--->tFileOutputDelimited. It works fine.
Unfortunately, when the XML file is invalid, the tFileOutputDelimited contains no information about the problem I have in my XML file but only that the XML file is invalid ("file aaa.xml is invalid!"). Even if this information is important for me to log, I need to know more. As the size of my XML file will increase soon, I want to use my job to give me information about what is wrong and thus spend as less time as possible searching what's wrong with my XML file.
In the properties of the tXSDValidator I've seen that, when I check the "Print to console" checkbox, I have the information I need in the console. Unfortunately I don't know how to retrieve it. So I see 2 options :
- either there is a way to read the message printed in the console and to write it into a file,
- or there is an option in the tXSDValidator that allows to know what is wrong in the XML file.
Is one of this option possible ? Any other idea how to resolve my problem ?
Thanks in advance
One Star

Re: Validate XML file with XSD

Have you tried ((String)globalMap.get("tXSDValidator_1_ERROR_MESSAGE")) ?
I think you can use an "If" link based on the value of tXSDValidator_1_VALID and then write tXSDValidator_1_ERROR_MESSAGE in your file / console.