Hello everyone! Would you do me a favor?
I have a XML string:
<!-- begin -->
</serviceRoot>
<!-- end -->
// I want to read the text of <serviceMethod> with valueOf(String xpathExpression) method:
String s = document.valueOf("//serviceRoot/serviceMethod");
// The "s" shuld be "cxCharge", but it is "".
I found the "xmlns" is the cause of it. If I set xmlns to "" or delete it, I will get string I expected.
The xmlns always exsits and can't modify. How can I get expected string in this case?
Thank you very much!! :-)
Lei YuPing