XML SelectNodes For Infinite Nested Recurring Tags By Attribute

Trips

Well-known member
Joined
Aug 7, 2010
Messages
2,788
I have an xml document from which I am grabbing 2 attributes under //form/formelements/question/possibleanswers/possible/answer/blocks/bloack/formelements/question... I am trying to use SelectNodes to grab the same 2 elements from the same XML when
it is nested infinitely. For example, i am grabbing attrA an AttrB from each //form/formelements/question/possibleanswers/possible/answer/blocks/bloack/formelements/question, but if it exists I need to do the same for questions which exist from //form/formelements/question/possibleanswers/possible/answer/blocks/bloack/formelements/question/possibleanswers/possible/answer/blocks/bloack/formelements/question
and so forth. How can I do this with the following statement?
<span style="color:#2b91af; font-size:x-small <span style="color:#2b91af; font-size:x-small <font size="2" color="#2b91af <font size="2" color="#2b91af
XmlNodeList
</font></font><font size="2" color="#2b91af

</font>
<span style="font-size:x-small elements = newXml.SelectNodes(<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small "//form/formelements/question/possibleanswers/possibleanswer/blocks/block/formelements/question"<span style="font-size:x-small );

View the full article
 
Back
Top