Please help me in finding the xpath for these nodes

<IPAddss><ix>0</ix><addss ></addss ><desc /></IPAddss>
<IPAddss><ix>1</ix><addss ></addss ><desc /></IPAddss>
<IPAddss><ix>2</ix><addss ></addss ><desc /></IPAddss>
<IPAddss><ix>3</ix><addss ></addss ><desc /></IPAddss>
<IPAddss><ix>4</ix><addss ></addss ><desc /></IPAddss>
<IPAddss><ix>5</ix><addss ></addss ><desc /></IPAddss>
<IPAddss><ix>6</ix><addss ></addss ><desc /></IPAddss>
<IPAddss><ix>7</ix><addss ></addss ><desc /></IPAddss>
<IPAddss><ix>8</ix><addss ></addss ><desc /></IPAddss>
<IPAddss><ix>9</ix><addss ></addss ><desc /></IPAddss>

in this xml above, i need xpath to get the value of the ipaddresses

eg for getting what xpath should i use?


no that will not work, i have tried it already,


this path will represent all the ip's , say i need to get the first one alone.. there is a nod <ix> which has values 0 to 9.. somehow this node has to be used in the xpath .. bu i am not sure of how to.,,,

Edited 4 Years Ago by depakjan: n/a

Try the below if you want the first IP address


[1] means the position of <IPAddss>.
If you want to fetch the address depending upon <ix> then try the following

/IPAddses/IPAddss[ix = '0']/addss
This article has been dead for over six months. Start a new discussion instead.