MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / addSection

Method addSection

framework/serialization/serialize.cpp:290–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290SerializationNode *XMLSerializationNode::addSection(const char *name)
291{
292 auto includeNode = static_cast<XMLSerializationNode *>(this->addNode("xi:include"));
293 auto path = UString(name) + ".xml";
294 auto nsAttribute = includeNode->node.append_attribute("xmlns:xi");
295 nsAttribute.set_value("http://www.w3.org/2001/XInclude");
296 auto attribute = includeNode->node.append_attribute("href");
297 attribute.set_value(path.c_str());
298 return this->archive->newRoot(this->getPrefix(), name);
299}
300
301SerializationNode *XMLSerializationNode::getSectionOpt(const char *name)
302{

Callers 1

serializeOutSectionMapFunction · 0.80

Calls 2

addNodeMethod · 0.95
newRootMethod · 0.80

Tested by

no test coverage detected