summaryrefslogtreecommitdiff
path: root/src/pugixml.hpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-09-26 19:00:48 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-09-26 19:00:48 +0000
commit605ab1b145968dd9ab2a07536493cbeac9311ccc (patch)
treed437c210a2c18c54ac7d1bdc0721f1d242ab7411 /src/pugixml.hpp
parent901f3b1f2931f16f1b719dda369b51b1feadd0dd (diff)
Added DOCTYPE node and parse_doctype flag (the node contains DOCTYPE value so that the document contents can be preserved)
git-svn-id: http://pugixml.googlecode.com/svn/trunk@756 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src/pugixml.hpp')
-rw-r--r--src/pugixml.hpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/pugixml.hpp b/src/pugixml.hpp
index 814b0b7..2b53464 100644
--- a/src/pugixml.hpp
+++ b/src/pugixml.hpp
@@ -111,7 +111,8 @@ namespace pugi
node_cdata, // Character data, i.e. '<![CDATA[text]]>'
node_comment, // Comment tag, i.e. '<!-- text -->'
node_pi, // Processing instruction, i.e. '<?name?>'
- node_declaration // Document declaration, i.e. '<?xml version="1.0"?>'
+ node_declaration, // Document declaration, i.e. '<?xml version="1.0"?>'
+ node_doctype // Document type declaration, i.e. '<!DOCTYPE doc>'
};
// Parsing options
@@ -148,11 +149,19 @@ namespace pugi
// This flag determines if document declaration (node_declaration) is added to the DOM tree. This flag is off by default.
const unsigned int parse_declaration = 0x0100;
+ // This flag determines if document type declaration (node_doctype) is added to the DOM tree. This flag is off by default.
+ const unsigned int parse_doctype = 0x0200;
+
// 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.
const unsigned int parse_default = parse_cdata | parse_escapes | parse_wconv_attribute | parse_eol;
+ // The full parsing mode.
+ // Nodes of all types 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.
+ const unsigned int parse_full = parse_default | parse_pi | parse_comments | parse_declaration | parse_doctype;
+
// These flags determine the encoding of input data for XML document
enum xml_encoding
{