Default parsing mode now does not include parsing PI and comments.

git-svn-id: http://pugixml.googlecode.com/svn/trunk@19 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
arseny.kapoulkine 2006-12-11 13:04:04 +00:00
parent c1b5e15b95
commit 9db5197f82
2 changed files with 4 additions and 4 deletions

View File

@ -240,11 +240,11 @@ be just skipped:</p>
<li>If <b>parse_pi</b> is on, then processing instructions (<b>&lt;? ... ?&gt;</b>) are put into DOM
tree (with node type <b>node_pi</b>, otherwise they are discarded. Note that for now the prolog
(&lt;?xml ... ?&gt;) is parsed as a processing instruction.
<br>Default value: on
<br>Default value: off
<br>In W3C mode: on</li>
<li>If <b>parse_comments</b> is on, then comments (<b>&lt;!-- ... --&gt;</b>) are put into DOM
tree (with node type <b>node_comment</b>, otherwise they are discarded.
<br>Default value: on
<br>Default value: off
<br>In W3C mode: on</li>
<li>If <b>parse_cdata</b> is on, then the content of CDATA section (<b>&lt;![CDATA[[ ... ]]&gt;</b>)
is put into DOM tree (with node type <b>node_cdata</b>, otherwise it is discarded.

View File

@ -59,8 +59,8 @@ namespace pugi
const unsigned int parse_eol_cdata = 0x00004000; ///< Perform EOL handling in CDATA sections
const unsigned int parse_check_end_tags = 0x00010000; ///< Check start and end tag names and return error if names mismatch
const unsigned int parse_match_end_tags = 0x00020000; ///< Try to find corresponding start tag for an end tag
///< Set all flags, except parse_ws_pcdata and parse_trim_attribute
const unsigned int parse_default = 0x00FFFFFF & ~parse_ws_pcdata & ~parse_trim_attribute;
///< Set all flags, except parse_ws_pcdata, parse_trim_attribute, parse_pi and parse_comments
const unsigned int parse_default = 0x00FFFFFF & ~parse_ws_pcdata & ~parse_trim_attribute & ~parse_pi & ~parse_comments;
const unsigned int parse_noset = 0x80000000; ///< Parse with flags in xml_parser
const unsigned int parse_w3c = parse_pi | parse_comments | parse_cdata |