PLCnext API Documentation 23.0.2.9
|
XML context used during XML reading and writing to hold the context information More...
#include <XmlSerializationContext.hpp>
Public Member Functions | |
XmlSerializationContext (XmlConfigDocument &document, Version docSchemaVersion=Version(1, 0)) | |
Constructs an XmlContext instance. | |
XmlSerializationContext (XmlSerializationContext &arg)=default | |
Copy contructor. | |
XmlSerializationContext & | operator= (XmlSerializationContext &arg)=default |
Assignment operator. | |
~XmlSerializationContext (void)=default | |
Destructs this instance and frees all resouces. | |
String & | operator[] (const String &attributeName) |
operator [] to get and set attributes referenced by attributeName More... | |
const String & | operator[] (const String &attributeName) const |
Version | GetDocumentSchemaVersion (void) const |
returns the document schema version stored in this context More... | |
XmlConfigDocument & | GetDocument (void) |
void | ReadDocumentContext (XmlReader &reader) |
reads the document context i.e. schema version from the XMlReader More... | |
void | WriteDocumentContext (XmlWriter &writer) const |
void | InvalidXmlElementOccurs (XmlReader &reader, const char *xmlElementName) |
void | MissingXmlElementOccurs (XmlReader &reader, const char *xmlElementName) |
summary>Reads the include xml tags inside a configuration file to include further xml files | |
void | ReadIncludesElement (XmlReader &reader) |
summary>resolves a relative path into an absolute relative to the document path and replaces all placeholders | |
String | ResolvePath (const char *documentPath) |
summary>resolves a relative path into an absolute relative to the document path | |
String | ResolveRelativePath (const String &path) |
summary>resolves a string with a placeholder (Enviroment variables) | |
String | ResolvePlaceholder (const char *input) |
summary>Adds a xml file to the list of included files | |
void | AddIncludeFile (const String &path) |
Static Public Attributes | |
static const char * | IncludeXmlName |
static const char * | IncludesXmlName |
Friends | |
class | MultiXmlConfigDocument |
XML context used during XML reading and writing to hold the context information
|
inline |
returns the document schema version stored in this context
The document schema version is read by ReadDocumentContext
summary>return the XmlConfigDocument this context was created for
void Arp::System::Commons::Xml::XmlSerializationContext::InvalidXmlElementOccurs | ( | XmlReader & | reader, |
const char * | xmlElementName | ||
) |
summary>this operation should be called while xml serialisation when ever an xml element is missing
exception cref="XmlException">Is thrown
|
inline |
operator [] to get and set attributes referenced by attributeName
summary>operator [] to get attributes referenced by attributeName
void Arp::System::Commons::Xml::XmlSerializationContext::ReadDocumentContext | ( | XmlReader & | reader | ) |
reads the document context i.e. schema version from the XMlReader
is used by XmlConfigDocument summary>writes the document context i.e. schema version with the XMlWriter
is used by XmlConfigDocument
void Arp::System::Commons::Xml::XmlSerializationContext::WriteDocumentContext | ( | XmlWriter & | writer | ) | const |
summary>this operation should be called while xml serialisation when an unknown xml element is recognized
if the schema version of the file is greater then the schema version implemented a warning is logged otherwise a XmlException is thrown