senjuhashirama / pugixml

Automatically exported from code.google.com/p/pugixml
0 stars 0 forks source link

Not able to append child #175

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am trying to append a node. but fails.
Using pugi::xml_node append_child().
But  node is not appended. Not able to see new appended node in xml document.
Please help me.
Kshitija

Original issue reported on code.google.com by kshitija...@gmail.com on 25 Sep 2012 at 9:46

GoogleCodeExporter commented 9 years ago
Make sure the node you're appending a child to can have children - i.e. is of 
type node_element. You can check the type of the node using node.type() call.

Original comment by arseny.k...@gmail.com on 25 Sep 2012 at 3:54

GoogleCodeExporter commented 9 years ago
Child node is appended at exact location. but it is again appaending at the end 
of the document. How to avoid this?

Original comment by kshitija...@gmail.com on 26 Sep 2012 at 5:47

GoogleCodeExporter commented 9 years ago
If you call append_child just once, there will be only one appended node. You 
must be calling it multiple times for several copies of the node to appear - or 
you're displaying the document incorrectly. Please, provide the code that does 
both.

Original comment by arseny.k...@gmail.com on 26 Sep 2012 at 4:12

GoogleCodeExporter commented 9 years ago

Original comment by arseny.k...@gmail.com on 11 Oct 2012 at 4:43