Select node without namespace with XPath

后端 未结 2 1099
北海茫月
北海茫月 2020-12-19 03:15

I have a xml like


    Text
    Number
         


        
2条回答
  •  情书的邮戳
    2020-12-19 03:59

    You can bind any prefix you like (say banana) to the namespace "http://foo", and the expression /root/banana:child2 will find the child2 element, regardless what namespace prefix has been used in the source document. Only the namespace URI has to match.

提交回复
热议问题