I know this question has been asked several times over. For some reason I
cannot get it to sink in.
I would like to create a xml document fragment (<--I think that's what I
want, tell me if I'm wrong) that "looks" like this:
<Level1 att=? att2=? att3=?>
<Level2a>
<Level3a/>
<Level3b/>
</Level2a>
<Level2b>
<Level3a/>
<Level3b/>
</Level2b>
<Level2c>
<Level3a/>
<Level3b/>
</Level2c>
</Level1>
Then I append the above to an existing file, of course.
Now, the only way I've figured out how to do this is to...
Dim xmlDoc as new XMLDocument(), etc
docFrag.InnerXML = "<Level1></Level1>"
SelectSingleNode("/Level0").AppendChild(docFrag)
docFrag.InnerXML = "<Level2a></Level2a><Level2b></Level2b>" etc
SelectSingleNode(...) you get the idea.
This seems like a terrible waste of effort, not to mention just an ugly way
to go about things. Is there anyway to build that tree without all that
"manual" effort?
Thanks for your help.
ArmsTom