Jump to content

how to loop through xml tags?


tones
 Share

Recommended Posts

I would be grateful if anyone could help out with this small query, or point me in the right direction (have read the w3shcools for loop pages but am getting nowhere).I am sending an XmlHttpRequest, and the response xml looks as follows:<ResultSet><Result>foo</Result><Result>bar</Result><Result>foo</Result><Result>bar</Result>etc....</ResultSet>I can get the textContent of the first <Result> tag, but wondered how to loop through and return each of the other <Result> nodes?Many thanks in advance.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...