A
Anonymous
I have an XmlReader that's passed to a method while it's at the very
beginning of an element elem1.
....Rest of document...
<elem1 attr1="val1" attr2="val2">
<elem2 attr3="val3" />
<elem2 attr4="val4" attr5="val5" />
<elem2 attr6="val6" attr7="val7" />
</elem1>
....Rest of document...
Here's what I want to do but can't figure out how to. Can somebody tell
me how I can achieve what I want to in steps 1, 3, and 4? Thanks!
1. Stop processing immediately if the XmlReader is NOT at an <elem1>
element with zero or more nested <elem2> elements. There
should be no other nested elements.
2. Read in elem1 and all its attributes. (I can do this.)
3. Read in all nested elem2 elements, one by one, and their attributes,
one by one
4. Stop processing after the current elem1 element has been successfully
processed.
beginning of an element elem1.
....Rest of document...
<elem1 attr1="val1" attr2="val2">
<elem2 attr3="val3" />
<elem2 attr4="val4" attr5="val5" />
<elem2 attr6="val6" attr7="val7" />
</elem1>
....Rest of document...
Here's what I want to do but can't figure out how to. Can somebody tell
me how I can achieve what I want to in steps 1, 3, and 4? Thanks!
1. Stop processing immediately if the XmlReader is NOT at an <elem1>
element with zero or more nested <elem2> elements. There
should be no other nested elements.
2. Read in elem1 and all its attributes. (I can do this.)
3. Read in all nested elem2 elements, one by one, and their attributes,
one by one
4. Stop processing after the current elem1 element has been successfully
processed.