blob: 23407d11a078bb334e730fc2d47744ca1c57f1eb (
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
|
#include "cru/xml/XmlParser.hpp"
namespace cru::xml {
XmlNode XmlParser::Parse() {
if (!root_node_) {
root_node_ = DoParse();
}
return *root_node_;
}
XmlNode XmlParser::DoParse() {
XmlNode root(XmlNode::Type::Element);
XmlNode* current = &root;
int current_position = 0;
// TODO: Implement this.
while (current_position < xml_.size()) {
switch (xml_[current_position]) {
case '<': {
break;
}
}
}
return root;
}
} // namespace cru::xml
|