12/30/2008

XPath and default name space

when you use xpath to select nodes from a xml document which contains default namepsace, you may need read this article. If the xpath expression is "//cd" , the xpath parser will treat it as the element which namespace is null and local name is "cd". Adding the prefix and default namespace to namespace context always can help you resolve this issue perfactly. I remembered I also wrote some code for jaxws cosomization parser for cxf wsdl2java tool. I just reviewed. It probably can not handle the xpath expression. I will take a look at it and fix it later...