Search code examples
jqueryxmltraversal

Parse xml through jQuery get what is inside tags


I have the code provided from the following link.

jsfiddle

I am trying to get the word "other" which is inside the tags. In the best case the alerted value is undefined. I can't find it neither with the parent(), nor the siblings() or from its children().

other = xml.find("CustomerLoss High").next().html()

Solution

  • I found it.

    I had to do:

    other =  xml.find("Reputation").siblings().next().prop("tagName")