Tuesday, September 14, 2010

XPath, how to test?

Here is one sample about using “or” in XPath.

BusinessObjectDocument/TroubleTicketData/TroubleTicketIdentification[translate(normalize-space(TroubleTicketIdTypeCode),$lo,$up) = 'SIEBEL' or translate(normalize-space(TroubleTicketIdTypeCode),$lo,$up) = 'OPS']/TroubleTicketIdValue

How to test the xpath is correct?

There is website online allows us test xpath. For example: http://www.whitebeam.org/library/guide/TechNotes/xpathtestbed.rhtm

Here is another website for testing xslt http://www.bit-101.com/xpath/

It allows you upload your xml, input the xpath and see the result.

Another question here: can we make automatic test for testing xpath or xslt?

No comments:

Post a Comment