R
Rama
I am trying to use selectnodes on parentNode of the context Node and it is
not returning the correct resull. Heres my XML
1 <a>
2 <fields>
3 <field name='test1' >
4 <b>
5 <a>
6 <fields> // This is parent Node
7 <field name='test1' > // Context Node
8 </fields>
9 </a>
10 </b>
11 <field name='test2' >
12 </fields>
13 </a>
My Context node is node corresponding to line 7. The following code returns
2 nodes instead of 1 , nodes corresponding to line 3 and line 7
CurrentNode.parentNode.selectNodes("//fields/field[@name='test1']")
What is it that I am missing ? Any help would be appreciated.
Thanks,
Rama
not returning the correct resull. Heres my XML
1 <a>
2 <fields>
3 <field name='test1' >
4 <b>
5 <a>
6 <fields> // This is parent Node
7 <field name='test1' > // Context Node
8 </fields>
9 </a>
10 </b>
11 <field name='test2' >
12 </fields>
13 </a>
My Context node is node corresponding to line 7. The following code returns
2 nodes instead of 1 , nodes corresponding to line 3 and line 7
CurrentNode.parentNode.selectNodes("//fields/field[@name='test1']")
What is it that I am missing ? Any help would be appreciated.
Thanks,
Rama