e.g. I want to return the name of a node, i.e. a string, thus
/MxML/trades/trade/tradeBody/*[1]/local-name()
However when I try to evaluate it with doc.valueOf or doc.selectSingleNode, or whatever else I try I get this error:
org.dom4j.InvalidXPathException: Invalid XPath expression: /MxML/trades/trade/tradeBody/*[1]/local-name() Expected node-type
I know what its saying, I am returning a String and not a node, so how do I ask for this string?
Thanks.
Are you sure it works with JAXP? The expression does not look ok to me; local-name() is not a node-step.
This is fine with dom4j:
prints
Type: String, Value: fish