PLCnext API Documentation
20.6.0.30321
|
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. More... | |
XmlSerializationContext (XmlSerializationContext &arg)=default | |
Copy contructor. More... | |
XmlSerializationContext & | operator= (XmlSerializationContext &arg)=default |
Assignment operator. More... | |
~XmlSerializationContext (void)=default | |
Destructs this instance and frees all resouces. More... | |
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 More... | |
void | ReadIncludesElement (XmlReader &reader) |
summary>resolves a relative path into an absolute relative to the document path More... | |
String | ResolvePath (const char *documentPath) |
summary>resolves a string with a placeholder (Enviroment variables) More... | |
String | ResolvePlaceholder (const char *input) |
summary>Adds a xml file to the list of included files More... | |
void | AddIncludeFile (const String &path) |
Static Public Attributes | |
static const char * | IncludeXmlName |
static const char * | IncludesXmlName |
XML context used during XML reading and writing to hold the context information
Arp::System::Commons::Xml::XmlSerializationContext::XmlSerializationContext | ( | XmlConfigDocument & | document, |
Version | docSchemaVersion = Version(1, 0) |
||
) |
Constructs an XmlContext instance.
|
default |
Copy contructor.
|
default |
Destructs this instance and frees all resouces.
|
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
void Arp::System::Commons::Xml::XmlSerializationContext::MissingXmlElementOccurs | ( | XmlReader & | reader, |
const char * | xmlElementName | ||
) |
summary>Reads the include xml tags inside a configuration file to include further xml files
|
default |
Assignment operator.
|
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::ReadIncludesElement | ( | XmlReader & | reader | ) |
summary>resolves a relative path into an absolute relative to the document path
String Arp::System::Commons::Xml::XmlSerializationContext::ResolvePath | ( | const char * | documentPath | ) |
summary>resolves a string with a placeholder (Enviroment variables)
|
inline |
summary>Adds a xml file to the list of included files
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