dimanche 28 juin 2015

How to SELECT Specific LAST NODE Value under repeating parent Node

Can Someone Please Give me [XPATH or template] where i need to get the value of the LAST ID .under root of name Node where i need to consider name first four name only]

In the below example the value that i need will be GREEN3 by considering only first 4 names and last id out of 4. Please provide me the code snippet

<NAMES>
  <NAME>
    <ID>GREEN1</ID>
  </NAME>
  <NAME>
    <ID2>GREEN6</ID2>
  </NAME>
  <NAME>
    <ID>GREEN2</ID>
  </NAME>
  <NAME>
    <ID>GREEN3</ID>
  </NAME>
  <NAME>
    <ID>GREEN4</ID>
  </NAME>
  <NAME>
    <ID2>GREEN5</ID2>
  </NAME>
</NAMES>   

Aucun commentaire:

Enregistrer un commentaire