aboutsummaryrefslogtreecommitdiff
path: root/include/cru/xml/XmlParser.hpp
blob: 19f569d145144aa778ec6e19246db47c76f83085 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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