#include "xml-tree-builder.hpp"
#include <stdexcept>
+#include <cstdio>
#include <utility>
using namespace SXSI;
register_tag(xml_tree::ATTRIBUTE_DATA_OPEN_TAG,
xml_tree::ATTRIBUTE_DATA_OPEN_TAG_ID);
+ register_tag(xml_tree::CLOSE_TAG,
+ xml_tree::CLOSE_TAG_ID);
this->disable_text_index = disable_text_index;
if (!disable_text_index){
int32_t id = register_tag(tag);
tags->push_back(id);
par->push_back(true);
- if (!disable_text_index) text_positions->push_back(false);
+ if (!disable_text_index) text_positions->set_le(text_positions->size(), false);
}
void xml_tree_builder::close_tag(std::string)
xml_tree::tag_t t = xml_tree::CLOSE_TAG_ID;
tags->push_back(t);
par->push_back(false);
- if (!disable_text_index) text_positions->push_back(false);
+ if (!disable_text_index) text_positions->set_le(text_positions->size(), false);
}
void xml_tree_builder::text(std::string s)
if (!disable_text_index){
if (s.empty()) s = "\001";
tc_builder->InsertText((const unsigned char *) s.c_str());
- text_positions->set(text_positions->size() - 1, true);
+ text_positions->set_le(text_positions->size() - 1, true);
}
}