Go to the documentation of this file.
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
53 XERCES_CPP_NAMESPACE_USE
98 const std::string& fileName,
const ObjectState* rootState);
107 DOMDocument* doc)
const;
120 #if XERCES_VERSION_MAJOR >= 3
virtual ObjectState * readString(const std::string &source)
virtual void writeString(std::string &target, const ObjectState *rootState)
void setSourceFile(const std::string &fileName)
std::string schemaFile_
Schema file path.
XMLSerializer & operator=(const XMLSerializer &)
Assignment forbidden.
std::string sourceFile() const
std::string sourceFile_
Source file path.
void ensureValidStream(const std::string &fileName) const
bool hasChildElementNodes(const DOMNode *node) const
virtual void writeFile(const std::string &fileName, const ObjectState *rootState)
virtual ObjectState * readFile(const std::string &fileName)
void setSchemaFile(const std::string &fileName)
DOMImplementation * domImplementation_
Implementation of the DOM.
virtual ObjectState * readState()
std::string nsUri_
XML namespace URI.
void setDestinationFile(const std::string &fileName)
void setUseSchema(bool useSchema)
DOMDocument * createDOMDocument(const ObjectState *state) const
DOMElement * createDOM(ObjectState *state, DOMDocument *doc) const
void setXMLNamespace(std::string nsUri)
DOMBuilder * parser_
The parser that checks the XML file for errors with the Schema.
void setDestinationString(std::string &destination)
bool useSchema_
Indicates if xml file is validated using schema.
const std::string * sourceString_
Source string to read.
std::string destinationFile_
Destination file path.
ObjectState * createState(const DOMNode *node) const
void setSourceString(const std::string &source)
std::string * destinationString_
Destination string to write.
virtual void writeState(const ObjectState *rootState)