8#include "Arp/System/Commons/Logging.h"
9#include "Arp/System/Commons/Exceptions/KeyNotFoundException.hpp"
10#include "Arp/System/Commons/Configuration/PlaceholderExpression.hpp"
12namespace Arp {
namespace System {
namespace Commons {
namespace Xml
30 typedef std::map<String, String> Attributes;
49 static const char* IncludeXmlName;
50 static const char* IncludesXmlName;
85 void AddIncludeFile(
const String& path);
91 void ResolveWildcards(
const String& path);
96 Attributes additionalAttributes;
107 return this->documentSchemaVersion;
112 return this->document;
117 return this->additionalAttributes[attributeName];
122 auto i = this->additionalAttributes.find(attributeName);
123 if (i == this->additionalAttributes.end())
133 return this->placeholderExpression.Resolve(input);
This class represents the version of a special SDK or Arp build.
Definition: BasicVersion.hpp:36
Definition: PlaceholderExpression.hpp:17
static KeyNotFoundException Create(const T &keyValue)
Creates an KeyNotFoundException instance using a default message text.
Definition: KeyNotFoundException.hpp:79
special version of XmlConfigDocument to include xml configuration data from other xml files inside a ...
Definition: MultiXmlConfigDocument.hpp:26
Class handle xml configuration documents
Definition: XmlConfigDocument.hpp:21
Class to read an XML File. Non buffered reader, can only read forward
Definition: XmlReader.hpp:25
XML context used during XML reading and writing to hold the context information
Definition: XmlSerializationContext.hpp:26
String & operator[](const String &attributeName)
operator [] to get and set attributes referenced by attributeName
Definition: XmlSerializationContext.hpp:115
XmlSerializationContext(XmlConfigDocument &document, Version docSchemaVersion=Version(1, 0))
Constructs an XmlContext instance.
void MissingXmlElementOccurs(XmlReader &reader, const char *xmlElementName)
summary>Reads the include xml tags inside a configuration file to include further xml files
XmlSerializationContext & operator=(XmlSerializationContext &arg)=default
Assignment operator.
String ResolveRelativePath(const String &path)
summary>resolves a string with a placeholder (Enviroment variables)
~XmlSerializationContext(void)=default
Destructs this instance and frees all resouces.
void WriteDocumentContext(XmlWriter &writer) const
String ResolvePlaceholder(const char *input)
summary>Adds a xml file to the list of included files
Definition: XmlSerializationContext.hpp:131
XmlSerializationContext(XmlSerializationContext &arg)=default
Copy contructor.
String ResolvePath(const char *documentPath)
summary>resolves a relative path into an absolute relative to the document path
void ReadDocumentContext(XmlReader &reader)
reads the document context i.e. schema version from the XMlReader
void InvalidXmlElementOccurs(XmlReader &reader, const char *xmlElementName)
Version GetDocumentSchemaVersion(void) const
returns the document schema version stored in this context
Definition: XmlSerializationContext.hpp:105
void ReadIncludesElement(XmlReader &reader)
summary>resolves a relative path into an absolute relative to the document path and replaces all plac...
Class to write an XML File
Definition: XmlWriter.hpp:19
Arp::BasicVersion Version
The Arp Version class.
Definition: TypeSystem.h:30
@ System
System components used by the System, Device, Plc or Io domains.
Namespace for configuration related classes
Definition: CommandLineOptions.hpp:14
Root namespace for the PLCnext API