summaryrefslogtreecommitdiff
path: root/src/pugixml.hpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2016-01-08 08:37:26 -0800
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2016-01-08 08:37:26 -0800
commit2874f6f21dc22efab1a2884fe463c5461955a225 (patch)
tree7e45b251b6f7e327f9a03ec5edd5ad794ec2fc9f /src/pugixml.hpp
parentad3b492c1a4b3bf3a3163aa2af1641f422dba33f (diff)
Add initial support for parse_embed_pcdata
When this flag is true, PCDATA value is saved to the parent element instead of allocating a new node. This prevents some documents from round-tripping since it loses information, but can provide a significant memory reduction and parsing speedup for some documents.
Diffstat (limited to 'src/pugixml.hpp')
-rw-r--r--src/pugixml.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pugixml.hpp b/src/pugixml.hpp
index 540e6ba..4ed6f55 100644
--- a/src/pugixml.hpp
+++ b/src/pugixml.hpp
@@ -158,6 +158,11 @@ namespace pugi
// is a valid document. This flag is off by default.
const unsigned int parse_fragment = 0x1000;
+ // This flag determines if plain character data is be stored in the parent element's value. This significantly changes the structure of
+ // the document and does not allow some documents to round-trip; this flag is only recommended for parsing documents with a lot of
+ // PCDATA nodes in a very memory-constrained environment. This flag is off by default.
+ const unsigned int parse_embed_pcdata = 0x2000;
+
// The default parsing mode.
// Elements, PCDATA and CDATA sections are added to the DOM tree, character/reference entities are expanded,
// End-of-Line characters are normalized, attribute values are normalized using CDATA normalization rules.