| 211 | } |
| 212 | |
| 213 | std::string Element::toXML() const { |
| 214 | tinyxml2::XMLDocument doc; |
| 215 | tinyxml2::XMLDeclaration *xmlDeclarationNode = doc.NewDeclaration(); |
| 216 | doc.InsertFirstChild(xmlDeclarationNode); |
| 217 | |
| 218 | tinyxml2::XMLElement *root = doc.NewElement("node"); |
| 219 | recursiveToXML(root, this); |
| 220 | doc.LinkEndChild(root); |
| 221 | |
| 222 | tinyxml2::XMLPrinter printer; |
| 223 | doc.Print(&printer); |
| 224 | std::string xmlStr = std::string(printer.CStr()); |
| 225 | return xmlStr; |
| 226 | } |
| 227 | |
| 228 | void Element::fromXml(const tinyxml2::XMLDocument &nodeOfDoc, const ElementPtr &parentOfNode) { |
| 229 | const ::tinyxml2::XMLElement *node = nodeOfDoc.RootElement(); |
nothing calls this directly
no test coverage detected