diff options
author | crupest <crupest@outlook.com> | 2022-01-02 18:49:31 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-01-02 18:49:31 +0800 |
commit | 18099ad8f5c24b1c2b1c92238dbc54912eab0406 (patch) | |
tree | 514207d630a2100262aedaea276ea259bbc108b7 /include/cru/xml/XmlParser.hpp | |
parent | 96a93e17baaff2c2050eba2afada639e93001232 (diff) | |
download | cru-18099ad8f5c24b1c2b1c92238dbc54912eab0406.tar.gz cru-18099ad8f5c24b1c2b1c92238dbc54912eab0406.tar.bz2 cru-18099ad8f5c24b1c2b1c92238dbc54912eab0406.zip |
...
Diffstat (limited to 'include/cru/xml/XmlParser.hpp')
-rw-r--r-- | include/cru/xml/XmlParser.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/cru/xml/XmlParser.hpp b/include/cru/xml/XmlParser.hpp index 1d44c46f..188a08f2 100644 --- a/include/cru/xml/XmlParser.hpp +++ b/include/cru/xml/XmlParser.hpp @@ -28,6 +28,7 @@ class XmlParser { XmlElementNode* DoParse(); char16_t Read1(); + String ReadWithoutAdvance(int count = 1); void ReadSpacesAndDiscard(); String ReadSpaces(); String ReadIdenitifier(); @@ -36,8 +37,9 @@ class XmlParser { private: String xml_; - XmlElementNode* cache_; + XmlElementNode* cache_ = nullptr; + // Consider the while file enclosed by a single tag called $root. XmlElementNode* pseudo_root_node_ = new XmlElementNode(u"$root"); XmlElementNode* current_ = pseudo_root_node_; int current_position_ = 0; |