8#include "Arp/System/Core/TypeName.hxx"
9#include "Arp/System/Commons/Logging.h"
10#include "Arp/System/Commons/Exceptions/InvalidFormatException.hpp"
12namespace Arp {
namespace System {
namespace Commons {
namespace Xml
29 XmlWriter(
const String& filename,
bool indent,
const char* encoding =
"UTF-8");
147 SetAttributeValueInternal(attributeName,
String::Format(
"{}", value));
149 catch(std::exception& e)
166 void SetAttributeValueInternal(
const char* attributeName,
const char *value);
Implements a buffer which can be used to write xml data to memory
Definition: XmlBuffer.hpp:18
Class to write an XML File
Definition: XmlWriter.hpp:19
void WriteElementContent(const String &value)
writes the content inside the currently open element characters not allowed in xml are encoded
void WriteStartElement(const char *elementName)
writes an start element with the given name <elementName>
void WriteEndElement(void)
ends the currently open start element if no content was written inside this element,...
XmlWriter(XmlWriter &&arg)
Move contructor.
void WriteStartDocument(void)
writes the start of an xml document e.g. xml tag
void WriteEndDocument(void)
completes the xml document, must be called after the document data was written
static XmlWriter Create(XmlBuffer &buffer, bool indent, const char *encoding="UTF-8")
Creates a new Instance of the XmlWriter writing to an XmlBuffer in memory
static XmlWriter Create(const String &filename, bool indent, const char *encoding="UTF-8")
Creates a new Instance of the XmlWriter
bool GetIndent(void) const
Reads the indent status of this XmlWriter
const char * GetEncoding(void) const
Gets the encoding used by this XmlWriter
void WriteElementContentCData(const String &text)
writes the content inside the currently open element enclosed in a CDATA section characters not allow...
void SetAttributeValue(const char *attributeName, const T &value)
writes a new attribute for the currently open element characters not allowed in xml are not encoded
Definition: XmlWriter.hpp:143
~XmlWriter(void)
Destructs this instance and frees all resources.
static SelfType Format(const SelfType &format, const Args &... args)
Formats the format string using the .NET/Python syntax with the given variadic arguments.
Definition: BasicString.hxx:1493
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API