خرید بک لینک

Vote count: 0

for the following xml

<Student>
<Name>Marc</Name>
<Age>20</Age>
</Student>
<Student>
<Name>Peter</Name>
<Age>30</Age>
</Student>

I'm trying to run a code to go throught all the objects Student.

What I did so far is (taking into account xmldoc is my xmlDocuemtn variable)

Dim AllStudentNodes = xmldoc.Selectnodes("/Student")

For each item in AllStudentNodes

Name = xmlDoc.SelectSingleNode("/Student/Name").IerText

Next

What happens it is that it will only go take the first student name twice if there are two nodes named Student, three if there are three Nodes named Student..

It seems like it will get stuck on the first node as many times and Student nodes there are, even if those are different, it won't iterate through all of them.

Any suggestions?

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 28 خرداد 1395 ساعت: 15:05

صفحه بندی