XPATH syntices...

"Sameer Oak" <[email protected]> Sun, 17 Jul 2005 23:16:37 -0700
Newsgroups gmane.comp.gnome.gdome
Message-ID <[email protected]>
Please guide me how to construct different XPATH syntices.?

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.