I have this xml:
<?xml version="1.0" encoding="UTF-8"?>
<EchoWithPostResponse xmlns="http://tempuri.org/">
<EchoWithPostResult>
Hello World
</EchoWithPostResult>
</EchoWithPostResponse>
When I use the xpath:
/EchoWithPostResponse/EchoWithPostResult
Nothing gets selected. However when I take out the namespace it works (the inner node is selected s), so when I have this xml:
<?xml version="1.0" encoding="UTF-8"?>
<EchoWithPostResponse>
<EchoWithPostResult>
<add key="Aut开发者_StackOverflowhDllPath" value="" />
</EchoWithPostResult>
</EchoWithPostResponse>
How do I account for the namespace, I cant really have them taken out unfortunately.
You need to declare and use the namespace.
/a:EchoWithPostResponse/a:EchoWithPostResult
精彩评论