-1

I am using Libxml2 Every time i am adding new nodes to the existing XML document. Adding new nodes is fine but what ever i added nodes in the XML document it added last of the child node but i want to add new nodes after the root node.

Naveen Kumar
  • 159
  • 1
  • 1
  • 5

1 Answers1

0

Once you've created your new node, you can get use xmlAddPrevSibling on the current first child of the root to get your new node inserted "before" the current first child.

Jason Viers
  • 1,722
  • 12
  • 20