different xpath syntices...
Sameer Oak <[email protected]> 13 Jul 2005 17:54:36 +0530
| Newsgroups | gmane.comp.gnome.gdome |
|---|---|
| Message-ID | <[email protected]> |
Can someone please give me the different ways one can construct the
XPATH?
For instance, for the following xml snipett
----
<root>
<child_1 attr="1"/>
<child_2>
<child_3> attr="abcd"/>
</child_2>
<child_2>
<child_3> attr="xyz"/>
</child_2>
</child_1>
</root>
----
and retrieving attribute value of attribute "attr" at the following
XPATHs
//root/child_1/child_2[0]/child_3
//root/child_1/child_2[1]/child_3
will respectively give "abcd" and "xyz".
Am I correct?
Please guide me.
Regards,
Sam Oak.