275
Views
5
Comments
Solved
How to loop through a XmlNodeList
Question

I use XmlDocument_SelectNodes in the XML extension and got a XmlNodeList object. How do I loop through this list?


2016-04-22 00-29-45
Nuno Reis
 
MVP
Solution

You can use NodeList_Count to determine the size.


1. XmlDocument_SelectNodes returns a XmlNodeList.

2. XmlNodeList_Count receives that XmlNodeList and returns the size (it would be easier if it was a function, but it is an action).

I'll be away for a few days so I can't help you if this isn't enough.

2018-11-06 14-26-44
Suraj Borade

Hi Stanley,

Is your problem solved with above solution? Let us know if not.

UserImage.jpg
Stanley Mok

Hi Nuno and Suraj,

How do I get a XmlNode from the XmlNodeList?

UserImage.jpg
Stanley Mok

Ok, I find out how to get a XmlNode but I got "Called EndIteration while the list was not being iterated..." error when try to refresh the screen.

UserImage.jpg
Stanley Mok

I find out the error is from an outer loop. Everything is working now.

Thanks,

Stanley

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.