diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2014-04-29 13:06:50 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-04-29 13:06:50 +0200 |
commit | f6313f17cb87d62c4a73f9d135baafd076431311 (patch) | |
tree | 1acd7c0ee273f2f423a835641f2d100a3a0d6202 /xml/parser.hxx | |
parent | 818bedc799073966a4c56fd83ab1df358b9e9c24 (diff) |
Accumulate characters in simple content
This makes the high-level data extraction (e.g., value<T>()) much more
usable since without this functionality the content can be delivered in
multiple chunks.
Diffstat (limited to 'xml/parser.hxx')
-rw-r--r-- | xml/parser.hxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xml/parser.hxx b/xml/parser.hxx index b9b5d4c..ab31959 100644 --- a/xml/parser.hxx +++ b/xml/parser.hxx @@ -128,7 +128,7 @@ namespace xml event_type next () { - // Move to .ixx. + //@@ Move to .ixx. if (state_ == state_next) return next_ (false); @@ -279,9 +279,9 @@ namespace xml public: enum content_type { - // element characters whitespaces + // element characters whitespaces notes empty, // no no ignored - simple, // no yes preserved + simple, // no yes preserved content accumulated complex, // yes no ignored mixed // yes yes preserved }; @@ -345,6 +345,7 @@ namespace xml XML_Parser p_; std::size_t depth_; + bool accumulate_; // Whether we are accumulating character content. enum {state_next, state_peek} state_; event_type event_; event_type queue_; |