diff options
Diffstat (limited to 'src/utils/xml/pugixml.inc')
-rw-r--r-- | src/utils/xml/pugixml.inc | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/utils/xml/pugixml.inc b/src/utils/xml/pugixml.inc index 4350a8e71..f6257a967 100644 --- a/src/utils/xml/pugixml.inc +++ b/src/utils/xml/pugixml.inc @@ -36,20 +36,17 @@ #define xmlChar char #define XmlFree(ptr) #define XmlNodeDefault pugi::xml_node() - -// +++ need impliment get context #define XmlNodeGetContent(node) (node).child_value() - -// +++ need impliment writing code -#define XmlTextWriterPtr pugi::xml_writer* -#define XmlTextWriterStartElement(writer, name) -#define XmlTextWriterEndElement(writer) -#define XmlTextWriterWriteAttribute(writer, name, content) -#define XmlNewTextWriterFilename(name, flags) nullptr; +#define XmlTextWriterPtr XML::Writer * +#define XmlTextWriterStartElement(writer, name) (writer)->startNode(name) +#define XmlTextWriterEndElement(writer) (writer)->endNode() +#define XmlTextWriterWriteAttribute(writer, name, content) \ + (writer)->addAttribute(name, content) +#define XmlNewTextWriterFilename(name, flags) new XML::Writer(name); #define XmlTextWriterSetIndent(writer, flags) #define XmlTextWriterStartDocument(writer, p1, p2, p3) -#define XmlTextWriterEndDocument(writer) -#define XmlFreeTextWriter(writer) +#define XmlTextWriterEndDocument(writer) (writer)->endDocument() +#define XmlFreeTextWriter(writer) delete writer #endif // ENABLE_PUGIXML #endif // UTILS_XML_PUGIXML_INC |