falcong / pugixml

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

lost commtnt #96

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I load file with comments. I add few nodes and save file. Comments lost.

version 1.0
OS: Windows XP SP3
Compiler: MSVS 2008

Original issue reported on code.google.com by Maveric1...@gmail.com on 5 Mar 2011 at 7:58

GoogleCodeExporter commented 9 years ago
With what flags are you loading the document?

Default mode (parse_default) skips comments, so you should use either 
parse_default | parse_comments flag combination when loading a document or 
parse_full which includes comment parsing (along with other nodes like 
processing instructions and document type declarations).

Original comment by Where...@gmail.com on 6 Mar 2011 at 5:27

GoogleCodeExporter commented 9 years ago
Thanks for the response, N.

I'll add that this is a documented behaviour - you can consult the manual ( 
http://pugixml.googlecode.com/svn/tags/latest/docs/manual/dom.html#manual.dom.tr
ee ) to see if the needed node type is recognized by default, and the override 
flag.

Original comment by arseny.k...@gmail.com on 8 Mar 2011 at 5:11