Please, don’t blame me for the messed up namespace on productid, not my XML.
However if I do
check((xpath("//*").saveAs(“stuff”))
it gives me an error when it does the implicit exists
However it should work fine. That xpath (not the one I want but I just want to get SOMETHING to work) works fine in Oxygen in XPath 1.0 and 2.0 modes.
As its so permissive.
Now, I can save the xml, e.g.
bodyString.saveAs(“returned_xml”)
And can even print out as debug later on via exec(session=>session)
How would I write my own check predicate? i.e. take xml string, perform various of my own xpath tests, emit an error to gatling if I’m not happy.
Gatling uses plain Java Xerces’ XPath, no custom stuff here.
Could you please provide a XML sample and XPath expression that look like your real world use case?
You can try an online XPath tester such as this one: http://www.freeformatter.com/xpath-tester.html