diff options
author | crupest <crupest@outlook.com> | 2021-12-31 00:26:55 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-12-31 00:26:55 +0800 |
commit | 4e92e8709b30c385e1a88d7d4f76c50ee4a3d736 (patch) | |
tree | 2720fa8b17a9108617e54063b4fd06db7b28dbcb /include/cru/xml/XmlParser.hpp | |
parent | aa923364615b77e152d532b021fe1536fcf96a50 (diff) | |
download | cru-4e92e8709b30c385e1a88d7d4f76c50ee4a3d736.tar.gz cru-4e92e8709b30c385e1a88d7d4f76c50ee4a3d736.tar.bz2 cru-4e92e8709b30c385e1a88d7d4f76c50ee4a3d736.zip |
...
Diffstat (limited to 'include/cru/xml/XmlParser.hpp')
-rw-r--r-- | include/cru/xml/XmlParser.hpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/cru/xml/XmlParser.hpp b/include/cru/xml/XmlParser.hpp new file mode 100644 index 00000000..19f569d1 --- /dev/null +++ b/include/cru/xml/XmlParser.hpp @@ -0,0 +1,29 @@ +#pragma once + +#include "XmlNode.hpp" + +#include "cru/common/String.hpp" + +#include <optional> + +namespace cru::xml { +class XmlParser { + public: + explicit XmlParser(String xml); + + CRU_DELETE_COPY(XmlParser) + CRU_DELETE_MOVE(XmlParser) + + ~XmlParser(); + + XmlNode Parse(); + + private: + XmlNode DoParse(); + + private: + String xml_; + + std::optional<XmlNode> root_node_; +}; +} // namespace cru::xml |