| Author |
query on parent axis in xpath
|
sid sree
Ranch Hand
Joined: Jun 28, 2007
Posts: 186
|
|
Hi my input xml
My xpath expression
Also tried
My expected result Hello elemet.
Actual Result No elements
Where am i going wrong ?
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16482
|
|
|
So you started from your context node and looked for a child element whose name was Hello. Maybe you found that Hello element and maybe you didn't, depending on what your context node was. Then you looked for a parent of that node which was a Bye element. Presumably that Hello element isn't a child of any Bye element; it certainly isn't if that's your whole document.
|
 |
sid sree
Ranch Hand
Joined: Jun 28, 2007
Posts: 186
|
|
Thanks, I was reading the expression wrongly !
Yes that was my entire document
This returns to me what i need.
|
 |
 |
|
|
subject: query on parent axis in xpath
|
|
|