ITsolutionWizard
asked on
xml listing
using c#, is it possible to find all
assume i have xml file with over 1000 nodes below. I want to get the list of attitrbute called ID.
but I won't know where is the root. like tests or test.
I basically just want to loop xml to find all of the ID name, and then find t he element name.
once i get element name, then i want to fill in the value <ans>got it</ans>
and i
<tests>
<test id="id_name1">
<ans id=id_ans1"></ans>
</test>
</test>
<test id="id_name2">
<ans id=id_ans2"></ans></test>
</test>
</tests>
assume i have xml file with over 1000 nodes below. I want to get the list of attitrbute called ID.
but I won't know where is the root. like tests or test.
I basically just want to loop xml to find all of the ID name, and then find t he element name.
once i get element name, then i want to fill in the value <ans>got it</ans>
and i
<tests>
<test id="id_name1">
<ans id=id_ans1"></ans>
</test>
</test>
<test id="id_name2">
<ans id=id_ans2"></ans></test>
</test>
</tests>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The solution completely answers the question.
XMLdocument to read the entire document in one shot and search that for your tags.
Open in new window
your xml
Open in new window