• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ADDING TWO XML FILES

 
michael byrd
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
How can I add the contents of XML DOC 1 into XML DOC 2 to produce something like XML DOC 3?

XML DOC 1

<Fruits>
<Apple>apples</Apple>
<Banana>bananas</Banana>
<Orange>oranges</Orange>
</Fruits>


XML DOC 2

<Fruits>
<Mango>mangos</Mango>
<Pears>pears</Pears>
<Litchi>litchi</Litchi>
<Grapes>grapes</Grapes>
</Fruits>


XML DOC 3

<Fruits>
<Apple>apples</Apple>
<Banana>bananas</Banana>
<Orange>oranges</Orange>
<Mango>mangos</Mango>
<Pears>pears</Pears>
<Litchi>litchi</Litchi>
<Grapes>grapes</Grapes>
</Fruits>
 
Jesus Angeles
Ranch Hand
Posts: 2068
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may use SAX(parse them both, creating a 3rd xml) or DOM(load them into dom objects and combine them).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic