8 #include "Arp/System/Commons/Logging.h" 9 #include "Arp/System/Commons/Exceptions/KeyNotFoundException.hpp" 10 #include "Arp/System/Commons/Configuration/PlaceholderExpression.hpp" 12 namespace Arp {
namespace System {
namespace Commons {
namespace Xml
20 class XmlConfigDocument;
27 typedef std::map<String, String> Attributes;
43 const String& operator[](
const String& attributeName)
const;
46 static const char* IncludeXmlName;
47 static const char* IncludesXmlName;
53 Version GetDocumentSchemaVersion(
void)
const;
60 void ReadDocumentContext(
XmlReader& reader);
63 void WriteDocumentContext(
XmlWriter& writer)
const;
68 void InvalidXmlElementOccurs(
XmlReader& reader,
const char* xmlElementName);
71 void MissingXmlElementOccurs(
XmlReader& reader,
const char* xmlElementName);
73 void ReadIncludesElement(
XmlReader& reader);
75 String ResolvePath(
const char* documentPath);
77 String ResolvePlaceholder(
const char* input);
80 void AddIncludeFile(
const String& path);
86 void ResolveWildcards(
const String& path);
87 void AddMultiFile(
const String& path);
92 Attributes additionalAttributes;
103 return this->documentSchemaVersion;
108 return this->document;
113 return this->additionalAttributes[attributeName];
118 auto i = this->additionalAttributes.find(attributeName);
119 if (i == this->additionalAttributes.end())
129 return this->placeholderExpression.Resolve(input);
Class to write an XML File
Definition: XmlWriter.hpp:20
static KeyNotFoundException Create(const T &keyValue)
Creates an KeyNotFoundException instance using a default message text.
Definition: KeyNotFoundException.hpp:79
String ResolvePlaceholder(const char *input)
summary>Adds a xml file to the list of included files
Definition: XmlSerializationContext.hpp:127
Version GetDocumentSchemaVersion(void) const
returns the document schema version stored in this context
Definition: XmlSerializationContext.hpp:101
This class represents the version of a special SDK or Arp build.
Definition: BasicVersion.hpp:34
Class handle xml configuration documents
Definition: XmlConfigDocument.hpp:19
Root namespace for the PLCnext API
Class to read an XML File. Non buffered reader, can only read forward
Definition: XmlReader.hpp:22
String & operator[](const String &attributeName)
operator [] to get and set attributes referenced by attributeName
Definition: XmlSerializationContext.hpp:111
Definition: PlaceholderExpression.hpp:15
System components used by the System, Device, Plc or Io domains.
Namespace for configuration related classes
XML context used during XML reading and writing to hold the context information
Definition: XmlSerializationContext.hpp:24