mlse
01-30-2009, 02:06 PM
Hi all,
This question is a follow-on from the one I posted here (http://www.codingforums.com/showthread.php?p=776079#post776079).
Consider the following equivalent XML fragments:
<root>
<aaa xmlns="http:www.whatever.com">
<bbb />
</aaa>
</root>
<root xmlns:x="http:www.whatever.com">
<x:aaa>
<x:bbb />
</x:aaa>
</root>
So, what would be the xpath for extracting "bbb" in each case? Would it be the same in each case? I hope it would be the same in each case because the two cases are equivalent.
EDIT: My instictive reaction in the second case is to write /root/x:aaa/x:bbb, but this would not work for the first case.
This question is a follow-on from the one I posted here (http://www.codingforums.com/showthread.php?p=776079#post776079).
Consider the following equivalent XML fragments:
<root>
<aaa xmlns="http:www.whatever.com">
<bbb />
</aaa>
</root>
<root xmlns:x="http:www.whatever.com">
<x:aaa>
<x:bbb />
</x:aaa>
</root>
So, what would be the xpath for extracting "bbb" in each case? Would it be the same in each case? I hope it would be the same in each case because the two cases are equivalent.
EDIT: My instictive reaction in the second case is to write /root/x:aaa/x:bbb, but this would not work for the first case.