Please help me in finding the xpath for these nodes
<IPAddses> <IPAddss><ix>0</ix><addss >124.123.123.330</addss ><desc /></IPAddss> <IPAddss><ix>1</ix><addss >124.123.123.331</addss ><desc /></IPAddss> <IPAddss><ix>2</ix><addss >124.123.123.332</addss ><desc /></IPAddss> <IPAddss><ix>3</ix><addss >124.123.123.333</addss ><desc /></IPAddss> <IPAddss><ix>4</ix><addss >124.123.123.334</addss ><desc /></IPAddss> <IPAddss><ix>5</ix><addss >124.123.123.335</addss ><desc /></IPAddss> <IPAddss><ix>6</ix><addss >124.123.123.336</addss ><desc /></IPAddss> <IPAddss><ix>7</ix><addss >124.123.123.337</addss ><desc /></IPAddss> <IPAddss><ix>8</ix><addss >124.123.123.338</addss ><desc /></IPAddss> <IPAddss><ix>9</ix><addss >124.123.123.339</addss ><desc /></IPAddss> </IPAddses>
in this xml above, i need xpath to get the value of the ipaddresses
eg for getting 124.123.123.330 what xpath should i use?
/IPAddses/IPAddss/addss
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 which has values 0 to 9.. somehow this node has to be used in the xpath .. bu i am not sure of how to.,,,
Try the below if you want the first IP address
/IPAddses/IPAddss[1]/addss
[1] means the position of . If you want to fetch the address depending upon then try the following
/IPAddses/IPAddss[ix = '0']/addss