14 BEGIN_NAMESPACE_SERIALIZATION
17 using DxDocumentPtr = std::shared_ptr<DxDocument>;
24 DxNodePtr startNode =
nullptr;
85 std::ostream& outStream,
104 static DxDocumentPtr parseXmlFromInputStream(std::istream& inStream);
105 static void outputValue(std::string value,
bool escapeQuote, std::ostream& stream);
106 static void writeNode(
const DxNodePtr& node,
int indent, std::ostream& stream,
const DxDocumentWriteParameters writeParams);
109 END_NAMESPACE_SERIALIZATION
static void dxDocumentWriteToStream(const DxDocumentPtr &document, std::ostream &outStream, const DxDocumentWriteParameters writeParams)
Function writes a document to a ostream.
static DxDocumentPtr dxDocumentCreate()
Function creates new DxDocument.
static DxDocumentPtr dxDocumentParse(const std::string &fileName)
Function reads and parses an xml file using libxml2 library and returns parsed document.
static void dxDocumentWriteToFile(const DxDocumentPtr &document, const std::string &fileName, const DxDocumentWriteParameters writeParams)
Function writes a document to a file stream.
static void dxDocumentDestroy(DxDocumentPtr &document)
Function recursively clears all child nodes and sets document pointer to nullptr. ...
static DxNodePtr dxDocumentGetStartNode(const DxDocumentPtr &document)
Function returns a shared pointer to a root node (start node).
XmlSerializer class implements functions for parsing xml files or xml streams using libxml2 library a...
Definition: xml_serializer.h:40
static void dxDocumentSetStartNode(const DxDocumentPtr &document, const DxNodePtr &startNode)
Function sets a root node (start node) to a given document.
DxDocumentWriteParameters struct that contains information if nodes should be indented.
Definition: xml_serializer.h:30
DxNode class defines an internal xml node and implements functions for creating, modifying and removi...
DxDocument struct that contains shared pointer to a root node.
Definition: xml_serializer.h:22
static DxDocumentPtr dxDocumentParseStream(std::istream &inStream)
Function reads and parses an xml istream using libxml2 library and returns parsed document...