Пример #1
0
Stencil& Stencil::html(const std::string& html){
	// Clear content before appending new content from Html::Document
	clear();
	Html::Document doc(html);
	auto body = doc.find("body");
	if(auto elem = body.find("main","id","content")){
		append_children(elem);
	}
	else append_children(doc.find("body"));
	return *this;
}
Пример #2
0
void config::append(const config &cfg)
{
	append_children(cfg);
	BOOST_FOREACH(const attribute &v, cfg.values) {
		values[v.first] = v.second;
	}
}
Пример #3
0
void config::append(const config &cfg)
{
	append_children(cfg);
	foreach (const attribute &v, cfg.values) {
		values[v.first] = v.second;
	}
}
Пример #4
0
Node Node::append_xml(const std::string& xml){
	Document doc(xml);
	// To append a pugi::xml_document it is necessary to append each of
	// it children (instead of just the document root)
	append_children(doc);
	return doc;
}   
Пример #5
0
config& config::operator=(const config& cfg)
{
	if(this == &cfg) {
		return *this;
	}

	clear();
	append_children(cfg);
	values.insert(cfg.values.begin(), cfg.values.end());
	return *this;
}
Пример #6
0
config::config(const config& cfg) : values(cfg.values), children(), ordered_children()
{
	append_children(cfg);
}