
Trying to append a simple XML document as a node in an XML document
I have two XML documents. I would like to take the contents of the
second and append them as a node in the first.
For example:
-= XML 1 =-
<Person>
<FirstName />
<LastName />
</Person>
-= XML2 =-
<Address>
<Street />
<City />
<State />
<ZIP />
</Address>
I would like to end up with:
<Person>
<FirstName />
<LastName />
<Address>
<Street />
<City />
<State />
<ZIP />
</Address>
</Person>
I have read up on XML document fragments, but cannot seem to make
heads or tails of how to use them. I *can* loop through all of the
elements in XML2 and reproduce them in XML1, but that seems like the
wrong way to do it.
Thanks.
-Kevin Buchan