0

XML Validator - XPath expression

Hi all,

Could anyone please help me with the "Enter XPath" field on the XML Validator activity? The documentation is not very clear on what this function does. (The documentation says the following:
"In the Enter XPath textbox, enter the XPath of the XML file that you want to validate.")

I have tried several experiments to see what this function does, but can not see any differences in my results.

I'm using simple example XMLs and an example XSD:

<node>
      <item>
           <name>foo</name>
           <note>bar</note>
           <quantity>1</quantity>
           <price>5.00</price>
      </item>
</node>

The XSD already specifies quantity as a positiveInteger, so if I make this a 0 or negative value the validation on the entire XSD fails, as expected.
I tried entering XPath on the price node to make it fail (or only pass-through nodes that don't fail) if this value is not greater than 0:

/node/item[price>0.00]
or
node/item[price>0.00]

This has no effect on the execution or the results, as I expected. The Process Flow just runs and outputs all items, including the ones that contain negative prices. It also just passes if all prices are negative.
Am I expecting the wrong thing?

More information on what this XPath does would be greatly appreciated.

Thank you very much in advance!

PS: I'm currently using Adeptia 6.2 SP2.

 

Kind regards,

Steven.

1 comment

Please sign in to leave a comment.