Trying to append a simple XML document as a node in an XML document 
Author Message
 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



Tue, 25 Oct 2005 00:29:32 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. XML document from SELECT ... FOR XML

2. XML root node not found in my document !!

3. Q how would you go about renameing a node in a xml document

4. Selecting a node from an XML document

5. Accessing XML document from a Word document

6. XML: Using XPath navigation to enumerate certain xml nodes

7. Appending nodes to DOM document created with ASP

8. XML copy subnodes from one node to another node in another doc

9. XML copy subnodes from one node to another node in another doc

10. XML document?

11. XML tree in Word Document to appear the same in HTML source file

12. editing xml documents using vb.net

 

 
Powered by phpBB® Forum Software