[gdome] different xpath syntices...



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.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]