• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

appending nodes

 
shankar vembu
Ranch Hand
Posts: 309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have two xml fragments.
<personal>
<name>tom</name>
</personal>
<personal>
<name>charles</name>
</personal>
I need to combine these two to :
<personal>
<name>tom</name>
<name>charles</name>
</personal>
I get WRONG_DOCUMENT_ERR if i use Element.appendChild(). please suggest.
regards,
shankar.
 
Sonali Mohrir
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Appendchild method raises the WRONG_DOCUMENT_ERR: if newChild was created from a different document than the one that created this node.
 
John Wetherbie
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mohrir,
Thanks for helping out! Could you check the JavaRanch naming policy and re-register?
Thanks,
John
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic