}
+ XmlFile::XmlFile(FromStringTag, const string& content)
+ : doc(xmlReadMemory(content.c_str(), content.length(), NULL, NULL,
+ XML_PARSE_NOBLANKS | XML_PARSE_NONET))
+ {
+ if (!doc)
+ SN_THROW(IOErrorException("xmlReadMemory failed"));
+ }
+
+
XmlFile::~XmlFile()
{
xmlFreeDoc(doc);
public:
+ /** Types and values for tag dispatching. */
+ struct FromStringTag {};
+ static constexpr FromStringTag FromString{};
+
XmlFile();
XmlFile(int fd, const string& url);
XmlFile(const string& filename);
+ XmlFile(FromStringTag, const string& content);
~XmlFile();