Troy 0

Hey there,

I have a list of users in an xml file like this

<user>
  <username></username>
  <password></password>
</user>

I search through it until I find the username I want, which works fine, then I want to drop down to the next sibling (the password) with the nextSibling property but I have no idea how to do this, currently I am getting the username like this

userArray[i].childNodes[0].nodeValue

1 answer

danwellman 5600
0
points

you should just be able to do something like ../next-sibling[1]

Answered over 5 years ago by danwellman