34#ifndef TTA_XML_SERIALIZER_HH
35#define TTA_XML_SERIALIZER_HH
39#include <xercesc/util/XercesVersion.hpp>
41#if XERCES_VERSION_MAJOR >= 3
42#include <xercesc/dom/DOMLSParser.hpp>
44#include <xercesc/dom/DOMBuilder.hpp>
46#include <xercesc/dom/DOMDocument.hpp>
52#if _XERCES_VERSION >= 20200
53XERCES_CPP_NAMESPACE_USE
98 const std::string& fileName,
const ObjectState* rootState);
107 DOMDocument* doc)
const;
120#if XERCES_VERSION_MAJOR >= 3
DOMImplementation * domImplementation_
Implementation of the DOM.
XMLSerializer & operator=(const XMLSerializer &)
Assignment forbidden.
const std::string * sourceString_
Source string to read.
DOMElement * createDOM(ObjectState *state, DOMDocument *doc) const
void setUseSchema(bool useSchema)
virtual void writeString(std::string &target, const ObjectState *rootState)
std::string schemaFile_
Schema file path.
bool useSchema_
Indicates if xml file is validated using schema.
bool hasChildElementNodes(const DOMNode *node) const
void setSourceString(const std::string &source)
void setSchemaFile(const std::string &fileName)
void ensureValidStream(const std::string &fileName) const
void setXMLNamespace(std::string nsUri)
virtual ObjectState * readString(const std::string &source)
void setSourceFile(const std::string &fileName)
std::string sourceFile() const
std::string sourceFile_
Source file path.
DOMDocument * createDOMDocument(const ObjectState *state) const
std::string destinationFile_
Destination file path.
virtual void writeState(const ObjectState *rootState)
void setDestinationFile(const std::string &fileName)
virtual ObjectState * readFile(const std::string &fileName)
DOMBuilder * parser_
The parser that checks the XML file for errors with the Schema.
XMLSerializer(const XMLSerializer &)
Copying forbidden.
std::string * destinationString_
Destination string to write.
virtual ObjectState * readState()
virtual void writeFile(const std::string &fileName, const ObjectState *rootState)
ObjectState * createState(const DOMNode *node) const
void setDestinationString(std::string &destination)
std::string nsUri_
XML namespace URI.