Standard XPath processing in java with javax.xml.xpath works like this:
- I provide name for xml to process
- I provide xpath expression as a string.
- I gain answer stored as a list of nodes, or eventually as a single value depending on what type of output I select.
I need to write a couple of tests in java which basically should work like this: I provide xpath expression as a string and it checks if xpath output of this expression equals to some specified output(also provided as string). So I dont need traversing through node tree and stuff, I just need to gain xpath processor output as a string. Is there any way to do this?