Browse Source

Rename XML classes

Patrick-Christopher Mattulat 2 years ago
parent
commit
573b627ea9
33 changed files with 775 additions and 775 deletions
  1. 14 14
      CMakeLists.txt
  2. 0 40
      include/ls_std/io/xml/XMLDocument.hpp
  3. 0 77
      include/ls_std/io/xml/XMLNode.hpp
  4. 5 5
      include/ls_std/io/xml/XmlAttribute.hpp
  5. 10 10
      include/ls_std/io/xml/XmlDeclaration.hpp
  6. 40 0
      include/ls_std/io/xml/XmlDocument.hpp
  7. 77 0
      include/ls_std/io/xml/XmlNode.hpp
  8. 4 4
      include/ls_std/io/xml/XmlParseData.hpp
  9. 2 2
      include/ls_std/io/xml/XmlParseMode.hpp
  10. 16 16
      include/ls_std/io/xml/XmlParser.hpp
  11. 5 5
      include/ls_std/io/xml/XmlParserMock.hpp
  12. 11 11
      include/ls_std/io/xml/XmlReader.hpp
  13. 8 8
      include/ls_std/ls_std.hpp
  14. 0 40
      source/ls_std/io/xml/XMLAttribute.cpp
  15. 0 68
      source/ls_std/io/xml/XMLDeclaration.cpp
  16. 0 50
      source/ls_std/io/xml/XMLDocument.cpp
  17. 0 23
      source/ls_std/io/xml/XMLParserMock.cpp
  18. 40 0
      source/ls_std/io/xml/XmlAttribute.cpp
  19. 68 0
      source/ls_std/io/xml/XmlDeclaration.cpp
  20. 50 0
      source/ls_std/io/xml/XmlDocument.cpp
  21. 51 51
      source/ls_std/io/xml/XmlNode.cpp
  22. 52 52
      source/ls_std/io/xml/XmlParser.cpp
  23. 23 0
      source/ls_std/io/xml/XmlParserMock.cpp
  24. 12 12
      source/ls_std/io/xml/XmlReader.cpp
  25. 13 13
      test/TestDataFactory.cpp
  26. 2 2
      test/TestDataFactory.hpp
  27. 15 15
      test/cases/io/xml/XmlAttributeTest.cpp
  28. 21 21
      test/cases/io/xml/XmlDeclarationTest.cpp
  29. 24 24
      test/cases/io/xml/XmlDocumentTest.cpp
  30. 167 167
      test/cases/io/xml/XmlNodeTest.cpp
  31. 11 11
      test/cases/io/xml/XmlParserMockTest.cpp
  32. 17 17
      test/cases/io/xml/XmlParserTest.cpp
  33. 17 17
      test/cases/io/xml/XmlReaderTest.cpp

+ 14 - 14
CMakeLists.txt

@@ -79,17 +79,17 @@ set(SOURCE_FILES
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/logic/SerializableJsonStateConnection.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/logic/SerializableJsonState.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/serialization/json/logic/SerializableJsonStateMachine.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLAttribute.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLNode.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XmlAttribute.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XmlNode.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/base/Version.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLDeclaration.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLDocument.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLReader.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLParserMock.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XmlDeclaration.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XmlDocument.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XmlReader.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XmlParserMock.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/StandardOutputWriter.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/logic/Narrator.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/logic/IListener.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XMLParser.cpp
+        ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/io/xml/XmlParser.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/event/Event.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/event/EventHandler.cpp
         ${CMAKE_CURRENT_SOURCE_DIR}/source/ls_std/event/EventManager.cpp
@@ -141,17 +141,17 @@ if (${LS_STD_BUILD_WITH_TESTS})
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/serialization/json/logic/SerializableJsonStateMachineTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/TestDataFactory.hpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/TestDataFactory.cpp
-            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XMLAttributeTest.cpp
-            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XMLNodeTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XmlAttributeTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XmlNodeTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/base/VersionTest.cpp
-            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XMLDeclarationTest.cpp
-            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XMLDocumentTest.cpp
-            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XMLReaderTest.cpp
-            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XMLParserMockTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XmlDeclarationTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XmlDocumentTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XmlReaderTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XmlParserMockTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/observer/TestDataCar.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/observer/TestDataMercedesCar.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/logic/NarratorTest.cpp
-            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XMLParserTest.cpp
+            ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/io/xml/XmlParserTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/cases/event/EventTest.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/event/NewsAgency.cpp
             ${CMAKE_CURRENT_SOURCE_DIR}/test/classes/event/DailyNewsAgency.cpp

+ 0 - 40
include/ls_std/io/xml/XMLDocument.hpp

@@ -1,40 +0,0 @@
-/*
- * Author:          Patrick-Christopher Mattulat
- * Company:         Lynar Studios
- * E-Mail:          webmaster@lynarstudios.com
- * Created:         2020-09-27
- * Changed:         2021-05-01
- *
- * */
-
-#ifndef LS_STD_XML_DOCUMENT_HPP
-#define LS_STD_XML_DOCUMENT_HPP
-
-#include <memory>
-#include <ls_std/base/Class.hpp>
-#include "XMLNode.hpp"
-#include "XMLDeclaration.hpp"
-
-namespace ls_std
-{
-  class XMLDocument : public ls_std::Class
-  {
-    public:
-
-      XMLDocument();
-      ~XMLDocument() override = default;
-
-      std::shared_ptr<ls_std::XMLDeclaration> getDeclaration();
-      std::shared_ptr<ls_std::XMLNode> getRootElement();
-      void setDeclaration(const std::shared_ptr<ls_std::XMLDeclaration> &_declaration);
-      void setRootElement(const std::shared_ptr<ls_std::XMLNode> &_root);
-      std::string toXML();
-
-    private:
-
-      std::shared_ptr<ls_std::XMLDeclaration> declaration{};
-      std::shared_ptr<ls_std::XMLNode> rootElement{};
-  };
-}
-
-#endif

+ 0 - 77
include/ls_std/io/xml/XMLNode.hpp

@@ -1,77 +0,0 @@
-/*
- * Author:          Patrick-Christopher Mattulat
- * Company:         Lynar Studios
- * E-Mail:          webmaster@lynarstudios.com
- * Created:         2020-09-24
- * Changed:         2021-05-01
- *
- * */
-
-#ifndef LS_STD_XML_NODE_HPP
-#define LS_STD_XML_NODE_HPP
-
-#include <list>
-#include <memory>
-#include <ls_std/base/Class.hpp>
-#include "XMLAttribute.hpp"
-
-namespace ls_std
-{
-  class XMLNode : public ls_std::Class
-  {
-    public:
-
-      explicit XMLNode(std::string _name);
-      ~XMLNode() override = default;
-
-      bool addAttributeAfter(const std::shared_ptr<ls_std::XMLAttribute> &_attribute, const std::string &_name);
-      bool addAttributeBefore(const std::shared_ptr<ls_std::XMLAttribute> &_attribute, const std::string &_name);
-      bool addAttributeToBeginning(const std::shared_ptr<ls_std::XMLAttribute> &_attribute);
-      bool addAttributeToEnd(const std::shared_ptr<ls_std::XMLAttribute> &_attribute);
-      bool addChildAfter(const std::shared_ptr<ls_std::XMLNode> &_child, const std::shared_ptr<ls_std::XMLNode> &_search);
-      bool addChildBefore(const std::shared_ptr<ls_std::XMLNode> &_child, const std::shared_ptr<ls_std::XMLNode> &_search);
-      bool addChildToBeginning(const std::shared_ptr<ls_std::XMLNode> &_child);
-      bool addChildToEnd(const std::shared_ptr<ls_std::XMLNode> &_child);
-      void clearValue();
-      std::list<std::shared_ptr<ls_std::XMLAttribute>> getAttributes();
-      std::list<std::shared_ptr<ls_std::XMLNode>> getChildren();
-      std::list<std::shared_ptr<ls_std::XMLNode>> getChildren(const std::string &_name);
-      std::string getName();
-      std::string getValue();
-      bool hasAttribute(const std::string &_name);
-      bool hasChild(const std::string &_name);
-      bool hasChild(const std::shared_ptr<ls_std::XMLNode> &_child);
-      void removeFirstAttribute();
-      void removeLastAttribute();
-      void removeFirstChild();
-      void removeLastChild();
-      void setName(std::string _name);
-      void setValue(std::string _value);
-      std::string toXML();
-
-    protected:
-
-      std::string _toXML_(uint8_t _tabSize);
-
-    private:
-
-      std::list<std::shared_ptr<ls_std::XMLAttribute>> attributes{};
-      std::list<std::shared_ptr<ls_std::XMLNode>> children{};
-      std::string name{};
-      const static uint8_t TAB_SIZE{4};
-      std::string value{};
-
-      static std::string _getTab(uint8_t _tabSize);
-      bool _hasAttribute(const std::string &_name);
-      bool _hasChild(const std::shared_ptr<ls_std::XMLNode> &_child);
-      bool _hasChild(const std::string &_name);
-      std::string _toXMLAttributes();
-      std::string _toXMLChildren(uint8_t _tabSize);
-      std::string _toXMLCloseTag();
-      std::string _toXMLOpenTag();
-      std::string _toXMLOpenTagClose();
-      std::string _toXMLValue();
-  };
-}
-
-#endif

+ 5 - 5
include/ls_std/io/xml/XMLAttribute.hpp → include/ls_std/io/xml/XmlAttribute.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-23
- * Changed:         2021-05-01
+ * Changed:         2021-05-02
  *
  * */
 
@@ -15,18 +15,18 @@
 
 namespace ls_std
 {
-  class XMLAttribute : public ls_std::Class
+  class XmlAttribute : public ls_std::Class
   {
     public:
 
-      explicit XMLAttribute(std::string _name);
-      ~XMLAttribute() override = default;
+      explicit XmlAttribute(std::string _name);
+      ~XmlAttribute() override = default;
 
       std::string getName();
       std::string getValue();
       void setName(std::string _name);
       void setValue(std::string _value);
-      std::string toXML();
+      std::string toXml();
 
     private:
 

+ 10 - 10
include/ls_std/io/xml/XMLDeclaration.hpp → include/ls_std/io/xml/XmlDeclaration.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-27
- * Changed:         2021-05-01
+ * Changed:         2021-05-02
  *
  * */
 
@@ -11,16 +11,16 @@
 #define LS_STD_XML_DECLARATION_HPP
 
 #include <ls_std/base/Class.hpp>
-#include "XMLAttribute.hpp"
+#include "XmlAttribute.hpp"
 
 namespace ls_std
 {
-  class XMLDeclaration : public ls_std::Class
+  class XmlDeclaration : public ls_std::Class
   {
     public:
 
-      explicit XMLDeclaration(std::string _version);
-      ~XMLDeclaration() override = default;
+      explicit XmlDeclaration(std::string _version);
+      ~XmlDeclaration() override = default;
 
       std::string getEncoding();
       std::string getStandalone();
@@ -28,15 +28,15 @@ namespace ls_std
       void setEncoding(std::string _encoding);
       void setStandalone(std::string _standalone);
       void setVersion(std::string _version);
-      std::string toXML();
+      std::string toXml();
 
     private:
 
-      ls_std::XMLAttribute encoding{"encoding"};
-      ls_std::XMLAttribute standalone{"standalone"};
-      ls_std::XMLAttribute version{"version"};
+      ls_std::XmlAttribute encoding{"encoding"};
+      ls_std::XmlAttribute standalone{"standalone"};
+      ls_std::XmlAttribute version{"version"};
 
-      static std::string _toXMLAttribute(ls_std::XMLAttribute _attribute);
+      static std::string _toXmlAttribute(ls_std::XmlAttribute _attribute);
   };
 }
 

+ 40 - 0
include/ls_std/io/xml/XmlDocument.hpp

@@ -0,0 +1,40 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-09-27
+ * Changed:         2021-05-02
+ *
+ * */
+
+#ifndef LS_STD_XML_DOCUMENT_HPP
+#define LS_STD_XML_DOCUMENT_HPP
+
+#include <memory>
+#include <ls_std/base/Class.hpp>
+#include "XmlNode.hpp"
+#include "XmlDeclaration.hpp"
+
+namespace ls_std
+{
+  class XmlDocument : public ls_std::Class
+  {
+    public:
+
+      XmlDocument();
+      ~XmlDocument() override = default;
+
+      std::shared_ptr<ls_std::XmlDeclaration> getDeclaration();
+      std::shared_ptr<ls_std::XmlNode> getRootElement();
+      void setDeclaration(const std::shared_ptr<ls_std::XmlDeclaration> &_declaration);
+      void setRootElement(const std::shared_ptr<ls_std::XmlNode> &_root);
+      std::string toXml();
+
+    private:
+
+      std::shared_ptr<ls_std::XmlDeclaration> declaration{};
+      std::shared_ptr<ls_std::XmlNode> rootElement{};
+  };
+}
+
+#endif

+ 77 - 0
include/ls_std/io/xml/XmlNode.hpp

@@ -0,0 +1,77 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-09-24
+ * Changed:         2021-05-02
+ *
+ * */
+
+#ifndef LS_STD_XML_NODE_HPP
+#define LS_STD_XML_NODE_HPP
+
+#include <list>
+#include <memory>
+#include <ls_std/base/Class.hpp>
+#include "XmlAttribute.hpp"
+
+namespace ls_std
+{
+  class XmlNode : public ls_std::Class
+  {
+    public:
+
+      explicit XmlNode(std::string _name);
+      ~XmlNode() override = default;
+
+      bool addAttributeAfter(const std::shared_ptr<ls_std::XmlAttribute> &_attribute, const std::string &_name);
+      bool addAttributeBefore(const std::shared_ptr<ls_std::XmlAttribute> &_attribute, const std::string &_name);
+      bool addAttributeToBeginning(const std::shared_ptr<ls_std::XmlAttribute> &_attribute);
+      bool addAttributeToEnd(const std::shared_ptr<ls_std::XmlAttribute> &_attribute);
+      bool addChildAfter(const std::shared_ptr<ls_std::XmlNode> &_child, const std::shared_ptr<ls_std::XmlNode> &_search);
+      bool addChildBefore(const std::shared_ptr<ls_std::XmlNode> &_child, const std::shared_ptr<ls_std::XmlNode> &_search);
+      bool addChildToBeginning(const std::shared_ptr<ls_std::XmlNode> &_child);
+      bool addChildToEnd(const std::shared_ptr<ls_std::XmlNode> &_child);
+      void clearValue();
+      std::list<std::shared_ptr<ls_std::XmlAttribute>> getAttributes();
+      std::list<std::shared_ptr<ls_std::XmlNode>> getChildren();
+      std::list<std::shared_ptr<ls_std::XmlNode>> getChildren(const std::string &_name);
+      std::string getName();
+      std::string getValue();
+      bool hasAttribute(const std::string &_name);
+      bool hasChild(const std::string &_name);
+      bool hasChild(const std::shared_ptr<ls_std::XmlNode> &_child);
+      void removeFirstAttribute();
+      void removeLastAttribute();
+      void removeFirstChild();
+      void removeLastChild();
+      void setName(std::string _name);
+      void setValue(std::string _value);
+      std::string toXml();
+
+    protected:
+
+      std::string _toXml_(uint8_t _tabSize);
+
+    private:
+
+      std::list<std::shared_ptr<ls_std::XmlAttribute>> attributes{};
+      std::list<std::shared_ptr<ls_std::XmlNode>> children{};
+      std::string name{};
+      const static uint8_t TAB_SIZE{4};
+      std::string value{};
+
+      static std::string _getTab(uint8_t _tabSize);
+      bool _hasAttribute(const std::string &_name);
+      bool _hasChild(const std::shared_ptr<ls_std::XmlNode> &_child);
+      bool _hasChild(const std::string &_name);
+      std::string _toXmlAttributes();
+      std::string _toXmlChildren(uint8_t _tabSize);
+      std::string _toXmlCloseTag();
+      std::string _toXmlOpenTag();
+      std::string _toXmlOpenTagClose();
+      std::string _toXmlValue();
+  };
+}
+
+#endif

+ 4 - 4
include/ls_std/io/xml/XMLParseData.hpp → include/ls_std/io/xml/XmlParseData.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-17
- * Changed:         2021-04-23
+ * Changed:         2021-05-02
  *
  * */
 
@@ -12,14 +12,14 @@
 
 #include <cstdint>
 #include <memory>
-#include "XMLNode.hpp"
+#include "XmlNode.hpp"
 
 namespace ls_std
 {
-  struct XMLParseData
+  struct XmlParseData
   {
     uint8_t level{};
-    std::shared_ptr<ls_std::XMLNode> node{};
+    std::shared_ptr<ls_std::XmlNode> node{};
   };
 }
 

+ 2 - 2
include/ls_std/io/xml/XMLParseMode.hpp → include/ls_std/io/xml/XmlParseMode.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-13
- * Changed:         2021-04-23
+ * Changed:         2021-05-02
  *
  * */
 
@@ -12,7 +12,7 @@
 
 namespace ls_std
 {
-  enum XMLParseMode
+  enum XmlParseMode
   {
     XML_PARSE_MODE_ANALYZE = 0, XML_PARSE_MODE_DECLARATION, XML_PARSE_MODE_OPENING_TAG, XML_PARSE_MODE_VALUE, XML_PARSE_MODE_CLOSING_TAG
   };

+ 16 - 16
include/ls_std/io/xml/XMLParser.hpp → include/ls_std/io/xml/XmlParser.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-25
- * Changed:         2021-05-01
+ * Changed:         2021-05-02
  *
  * */
 
@@ -12,23 +12,23 @@
 
 #include <ls_std/base/Class.hpp>
 #include <ls_std/base/Types.hpp>
-#include "XMLDocument.hpp"
-#include "XMLParseMode.hpp"
-#include "XMLParseData.hpp"
+#include "XmlDocument.hpp"
+#include "XmlParseMode.hpp"
+#include "XmlParseData.hpp"
 #include <list>
 
 namespace ls_std
 {
-  class XMLParser : public ls_std::Class
+  class XmlParser : public ls_std::Class
   {
     public:
 
-      explicit XMLParser(const std::shared_ptr<ls_std::XMLDocument> &_document);
-      ~XMLParser() override = default;
+      explicit XmlParser(const std::shared_ptr<ls_std::XmlDocument> &_document);
+      ~XmlParser() override = default;
 
-      std::shared_ptr<ls_std::XMLDocument> getDocument();
+      std::shared_ptr<ls_std::XmlDocument> getDocument();
       void parse(const ls_std::byte_field &_data);
-      void setDocument(const std::shared_ptr<ls_std::XMLDocument> &_document);
+      void setDocument(const std::shared_ptr<ls_std::XmlDocument> &_document);
 
     protected:
 
@@ -38,15 +38,15 @@ namespace ls_std
     private:
 
       uint8_t currentLevel{};
-      std::shared_ptr<ls_std::XMLDocument> document{};
+      std::shared_ptr<ls_std::XmlDocument> document{};
       uint8_t maxLevel{};
-      ls_std::XMLParseMode mode{};
-      std::list<ls_std::XMLParseData> parseData{};
+      ls_std::XmlParseMode mode{};
+      std::list<ls_std::XmlParseData> parseData{};
 
       void _analyze(const ls_std::byte_field &_data, std::string::size_type _index);
-      void _assignDocument(const std::shared_ptr<ls_std::XMLDocument> &_document);
-      static std::shared_ptr<ls_std::XMLDeclaration> _createDeclaration(const std::list<std::pair<std::string, std::string>> &_attributes);
-      static std::shared_ptr<ls_std::XMLNode> _createNode(const std::list<std::pair<std::string, std::string>> &_attributes, const std::string &_name);
+      void _assignDocument(const std::shared_ptr<ls_std::XmlDocument> &_document);
+      static std::shared_ptr<ls_std::XmlDeclaration> _createDeclaration(const std::list<std::pair<std::string, std::string>> &_attributes);
+      static std::shared_ptr<ls_std::XmlNode> _createNode(const std::list<std::pair<std::string, std::string>> &_attributes, const std::string &_name);
       static std::pair<std::string, std::string> _findAttribute(const std::list<std::pair<std::string, std::string>> &_attributes, const std::string &_name);
       static size_t _findAttributeEndPosition(const ls_std::byte_field &_data);
       static ls_std::byte_field _getNextTagString(const ls_std::byte_field &_data, std::string::size_type _index);
@@ -55,7 +55,7 @@ namespace ls_std
       void _isOpeningTag(const ls_std::byte_field &_data, std::string::size_type _index);
       void _isValue(const ls_std::byte_field &_data, std::string::size_type _index);
       void _mergeNodes();
-      void _mergeChildrenToParentNode(const std::shared_ptr<ls_std::XMLNode> &_parent, std::list<ls_std::XMLParseData>::iterator &_iterator, uint8_t _parentLevel);
+      void _mergeChildrenToParentNode(const std::shared_ptr<ls_std::XmlNode> &_parent, std::list<ls_std::XmlParseData>::iterator &_iterator, uint8_t _parentLevel);
       void _mergeNodesOnCurrentLevel();
       void _parse(const ls_std::byte_field &_data);
       static std::pair<std::string, std::string> _parseAttribute(const ls_std::byte_field &_data);

+ 5 - 5
include/ls_std/io/xml/XMLParserMock.hpp → include/ls_std/io/xml/XmlParserMock.hpp

@@ -3,23 +3,23 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-18
- * Changed:         2021-05-01
+ * Changed:         2021-05-02
  *
  * */
 
 #ifndef LS_STD_XML_PARSER_MOCK_HPP
 #define LS_STD_XML_PARSER_MOCK_HPP
 
-#include "XMLParser.hpp"
+#include "XmlParser.hpp"
 
 namespace ls_std
 {
-  class XMLParserMock : public ls_std::XMLParser
+  class XmlParserMock : public ls_std::XmlParser
   {
     public:
 
-      XMLParserMock();
-      ~XMLParserMock() override = default;
+      XmlParserMock();
+      ~XmlParserMock() override = default;
 
       static std::pair<std::string, std::string> readAttribute(const ls_std::byte_field &_data);
       static std::list<std::pair<std::string, std::string>> readAttributes(ls_std::byte_field _data);

+ 11 - 11
include/ls_std/io/xml/XMLReader.hpp → include/ls_std/io/xml/XmlReader.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-08
- * Changed:         2021-05-01
+ * Changed:         2021-05-02
  *
  * */
 
@@ -11,21 +11,21 @@
 #define LS_STD_XML_READER_HPP
 
 #include <ls_std/base/Class.hpp>
-#include "XMLDocument.hpp"
+#include "XmlDocument.hpp"
 #include <ls_std/io/IReader.hpp>
 #include <ls_std/io/File.hpp>
-#include "XMLParseMode.hpp"
-#include "XMLParseData.hpp"
+#include "XmlParseMode.hpp"
+#include "XmlParseData.hpp"
 #include <list>
 
 namespace ls_std
 {
-  class XMLReader : public ls_std::Class, public ls_std::IReader
+  class XmlReader : public ls_std::Class, public ls_std::IReader
   {
     public:
 
-      explicit XMLReader(const std::shared_ptr<ls_std::XMLDocument> &_document, const std::string &_absolutePath);
-      ~XMLReader() override = default;
+      explicit XmlReader(const std::shared_ptr<ls_std::XmlDocument> &_document, const std::string &_absolutePath);
+      ~XmlReader() override = default;
 
       // implementation
 
@@ -33,16 +33,16 @@ namespace ls_std
 
       // additional functionality
 
-      std::shared_ptr<ls_std::XMLDocument> getDocument();
-      void setDocument(const std::shared_ptr<ls_std::XMLDocument> &_document);
+      std::shared_ptr<ls_std::XmlDocument> getDocument();
+      void setDocument(const std::shared_ptr<ls_std::XmlDocument> &_document);
       void setFile(const ls_std::File &_xmlFile);
 
     private:
 
-      std::shared_ptr<ls_std::XMLDocument> document{};
+      std::shared_ptr<ls_std::XmlDocument> document{};
       ls_std::File xmlFile;
 
-      void _assignDocument(const std::shared_ptr<ls_std::XMLDocument> &_document);
+      void _assignDocument(const std::shared_ptr<ls_std::XmlDocument> &_document);
       void _assignFile(ls_std::File _xmlFile);
   };
 }

+ 8 - 8
include/ls_std/ls_std.hpp

@@ -36,14 +36,14 @@
 #include "io/logging/LogLevel.hpp"
 #include "io/logging/LogLevelValue.hpp"
 #include "io/logging/Logger.hpp"
-#include "io/xml/XMLReader.hpp"
-#include "io/xml/XMLParseMode.hpp"
-#include "io/xml/XMLParseData.hpp"
-#include "io/xml/XMLNode.hpp"
-#include "io/xml/XMLDocument.hpp"
-#include "io/xml/XMLDeclaration.hpp"
-#include "io/xml/XMLAttribute.hpp"
-#include "io/xml/XMLParser.hpp"
+#include "io/xml/XmlReader.hpp"
+#include "io/xml/XmlParseMode.hpp"
+#include "io/xml/XmlParseData.hpp"
+#include "io/xml/XmlNode.hpp"
+#include "io/xml/XmlDocument.hpp"
+#include "io/xml/XmlDeclaration.hpp"
+#include "io/xml/XmlAttribute.hpp"
+#include "io/xml/XmlParser.hpp"
 #include "io/File.hpp"
 #include "io/FileOutputStream.hpp"
 #include "io/FilePathSeparator.hpp"

+ 0 - 40
source/ls_std/io/xml/XMLAttribute.cpp

@@ -1,40 +0,0 @@
-/*
- * Author:          Patrick-Christopher Mattulat
- * Company:         Lynar Studios
- * E-Mail:          webmaster@lynarstudios.com
- * Created:         2020-09-23
- * Changed:         2021-04-23
- *
- * */
-
-#include <ls_std/io/xml/XMLAttribute.hpp>
-
-ls_std::XMLAttribute::XMLAttribute(std::string _name)
-    : ls_std::Class("XMLAttribute"),
-      name(std::move(_name))
-{}
-
-std::string ls_std::XMLAttribute::getName()
-{
-  return this->name;
-}
-
-std::string ls_std::XMLAttribute::getValue()
-{
-  return this->value;
-}
-
-void ls_std::XMLAttribute::setName(std::string _name)
-{
-  this->name = std::move(_name);
-}
-
-void ls_std::XMLAttribute::setValue(std::string _value)
-{
-  this->value = std::move(_value);
-}
-
-std::string ls_std::XMLAttribute::toXML()
-{
-  return this->name + "=\"" + this->value + "\"";
-}

+ 0 - 68
source/ls_std/io/xml/XMLDeclaration.cpp

@@ -1,68 +0,0 @@
-/*
- * Author:          Patrick-Christopher Mattulat
- * Company:         Lynar Studios
- * E-Mail:          webmaster@lynarstudios.com
- * Created:         2020-09-29
- * Changed:         2021-04-23
- *
- * */
-
-#include <ls_std/io/xml/XMLDeclaration.hpp>
-
-ls_std::XMLDeclaration::XMLDeclaration(std::string _version) : ls_std::Class("XMLDeclaration")
-{
-  this->version.setValue(std::move(_version));
-}
-
-std::string ls_std::XMLDeclaration::getEncoding()
-{
-  return this->encoding.getValue();
-}
-
-std::string ls_std::XMLDeclaration::getStandalone()
-{
-  return this->standalone.getValue();
-}
-
-std::string ls_std::XMLDeclaration::getVersion()
-{
-  return this->version.getValue();
-}
-
-void ls_std::XMLDeclaration::setEncoding(std::string _encoding)
-{
-  this->encoding.setValue(std::move(_encoding));
-}
-
-void ls_std::XMLDeclaration::setStandalone(std::string _standalone)
-{
-  this->standalone.setValue(std::move(_standalone));
-}
-
-void ls_std::XMLDeclaration::setVersion(std::string _version)
-{
-  this->version.setValue(std::move(_version));
-}
-
-std::string ls_std::XMLDeclaration::toXML()
-{
-  std::string declaration = "<?xml";
-
-  declaration += ls_std::XMLDeclaration::_toXMLAttribute(this->version);
-  declaration += ls_std::XMLDeclaration::_toXMLAttribute(this->encoding);
-  declaration += ls_std::XMLDeclaration::_toXMLAttribute(this->standalone);
-
-  return declaration + " ?>";
-}
-
-std::string ls_std::XMLDeclaration::_toXMLAttribute(ls_std::XMLAttribute _attribute)
-{
-  std::string xmlString{};
-
-  if (!_attribute.getValue().empty())
-  {
-    xmlString = " " + _attribute.toXML();
-  }
-
-  return xmlString;
-}

+ 0 - 50
source/ls_std/io/xml/XMLDocument.cpp

@@ -1,50 +0,0 @@
-/*
- * Author:          Patrick-Christopher Mattulat
- * Company:         Lynar Studios
- * E-Mail:          webmaster@lynarstudios.com
- * Created:         2020-09-30
- * Changed:         2021-04-23
- *
- * */
-
-#include <ls_std/io/xml/XMLDocument.hpp>
-
-ls_std::XMLDocument::XMLDocument() : ls_std::Class("XMLDocument")
-{}
-
-std::shared_ptr<ls_std::XMLDeclaration> ls_std::XMLDocument::getDeclaration()
-{
-  return this->declaration;
-}
-
-std::shared_ptr<ls_std::XMLNode> ls_std::XMLDocument::getRootElement()
-{
-  return this->rootElement;
-}
-
-void ls_std::XMLDocument::setDeclaration(const std::shared_ptr<ls_std::XMLDeclaration> &_declaration)
-{
-  this->declaration = _declaration;
-}
-
-void ls_std::XMLDocument::setRootElement(const std::shared_ptr<ls_std::XMLNode> &_root)
-{
-  this->rootElement = _root;
-}
-
-std::string ls_std::XMLDocument::toXML()
-{
-  std::string xmlString{};
-
-  if (this->declaration != nullptr)
-  {
-    xmlString = this->declaration->toXML();
-
-    if (!xmlString.empty())
-    {
-      xmlString += "\n";
-    }
-  }
-
-  return xmlString + this->rootElement->toXML();
-}

+ 0 - 23
source/ls_std/io/xml/XMLParserMock.cpp

@@ -1,23 +0,0 @@
-/*
- * Author:          Patrick-Christopher Mattulat
- * Company:         Lynar Studios
- * E-Mail:          webmaster@lynarstudios.com
- * Created:         2020-10-18
- * Changed:         2020-11-26
- *
- * */
-
-#include <ls_std/io/xml/XMLParserMock.hpp>
-
-ls_std::XMLParserMock::XMLParserMock() : ls_std::XMLParser(nullptr)
-{}
-
-std::pair<std::string, std::string> ls_std::XMLParserMock::readAttribute(const ls_std::byte_field &_data)
-{
-  return ls_std::XMLParser::_readAttribute_(_data);
-}
-
-std::list<std::pair<std::string, std::string>> ls_std::XMLParserMock::readAttributes(ls_std::byte_field _data)
-{
-  return ls_std::XMLParser::_readAttributes_(std::move(_data));
-}

+ 40 - 0
source/ls_std/io/xml/XmlAttribute.cpp

@@ -0,0 +1,40 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-09-23
+ * Changed:         2021-05-02
+ *
+ * */
+
+#include <ls_std/io/xml/XmlAttribute.hpp>
+
+ls_std::XmlAttribute::XmlAttribute(std::string _name)
+    : ls_std::Class("XmlAttribute"),
+      name(std::move(_name))
+{}
+
+std::string ls_std::XmlAttribute::getName()
+{
+  return this->name;
+}
+
+std::string ls_std::XmlAttribute::getValue()
+{
+  return this->value;
+}
+
+void ls_std::XmlAttribute::setName(std::string _name)
+{
+  this->name = std::move(_name);
+}
+
+void ls_std::XmlAttribute::setValue(std::string _value)
+{
+  this->value = std::move(_value);
+}
+
+std::string ls_std::XmlAttribute::toXml()
+{
+  return this->name + "=\"" + this->value + "\"";
+}

+ 68 - 0
source/ls_std/io/xml/XmlDeclaration.cpp

@@ -0,0 +1,68 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-09-29
+ * Changed:         2021-05-02
+ *
+ * */
+
+#include <ls_std/io/xml/XmlDeclaration.hpp>
+
+ls_std::XmlDeclaration::XmlDeclaration(std::string _version) : ls_std::Class("XmlDeclaration")
+{
+  this->version.setValue(std::move(_version));
+}
+
+std::string ls_std::XmlDeclaration::getEncoding()
+{
+  return this->encoding.getValue();
+}
+
+std::string ls_std::XmlDeclaration::getStandalone()
+{
+  return this->standalone.getValue();
+}
+
+std::string ls_std::XmlDeclaration::getVersion()
+{
+  return this->version.getValue();
+}
+
+void ls_std::XmlDeclaration::setEncoding(std::string _encoding)
+{
+  this->encoding.setValue(std::move(_encoding));
+}
+
+void ls_std::XmlDeclaration::setStandalone(std::string _standalone)
+{
+  this->standalone.setValue(std::move(_standalone));
+}
+
+void ls_std::XmlDeclaration::setVersion(std::string _version)
+{
+  this->version.setValue(std::move(_version));
+}
+
+std::string ls_std::XmlDeclaration::toXml()
+{
+  std::string declaration = "<?xml";
+
+  declaration += ls_std::XmlDeclaration::_toXmlAttribute(this->version);
+  declaration += ls_std::XmlDeclaration::_toXmlAttribute(this->encoding);
+  declaration += ls_std::XmlDeclaration::_toXmlAttribute(this->standalone);
+
+  return declaration + " ?>";
+}
+
+std::string ls_std::XmlDeclaration::_toXmlAttribute(ls_std::XmlAttribute _attribute)
+{
+  std::string xmlString{};
+
+  if (!_attribute.getValue().empty())
+  {
+    xmlString = " " + _attribute.toXml();
+  }
+
+  return xmlString;
+}

+ 50 - 0
source/ls_std/io/xml/XmlDocument.cpp

@@ -0,0 +1,50 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-09-30
+ * Changed:         2021-05-02
+ *
+ * */
+
+#include <ls_std/io/xml/XmlDocument.hpp>
+
+ls_std::XmlDocument::XmlDocument() : ls_std::Class("XmlDocument")
+{}
+
+std::shared_ptr<ls_std::XmlDeclaration> ls_std::XmlDocument::getDeclaration()
+{
+  return this->declaration;
+}
+
+std::shared_ptr<ls_std::XmlNode> ls_std::XmlDocument::getRootElement()
+{
+  return this->rootElement;
+}
+
+void ls_std::XmlDocument::setDeclaration(const std::shared_ptr<ls_std::XmlDeclaration> &_declaration)
+{
+  this->declaration = _declaration;
+}
+
+void ls_std::XmlDocument::setRootElement(const std::shared_ptr<ls_std::XmlNode> &_root)
+{
+  this->rootElement = _root;
+}
+
+std::string ls_std::XmlDocument::toXml()
+{
+  std::string xmlString{};
+
+  if (this->declaration != nullptr)
+  {
+    xmlString = this->declaration->toXml();
+
+    if (!xmlString.empty())
+    {
+      xmlString += "\n";
+    }
+  }
+
+  return xmlString + this->rootElement->toXml();
+}

+ 51 - 51
source/ls_std/io/xml/XMLNode.cpp → source/ls_std/io/xml/XmlNode.cpp

@@ -3,19 +3,19 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-24
- * Changed:         2021-04-23
+ * Changed:         2021-05-02
  *
  * */
 
-#include <ls_std/io/xml/XMLNode.hpp>
+#include <ls_std/io/xml/XmlNode.hpp>
 #include <ls_std/utils/STLUtils.hpp>
 
-ls_std::XMLNode::XMLNode(std::string _name)
-    : ls_std::Class("XMLNode"),
+ls_std::XmlNode::XmlNode(std::string _name)
+    : ls_std::Class("XmlNode"),
       name(std::move(_name))
 {}
 
-bool ls_std::XMLNode::addAttributeAfter(const std::shared_ptr<ls_std::XMLAttribute> &_attribute, const std::string &_name)
+bool ls_std::XmlNode::addAttributeAfter(const std::shared_ptr<ls_std::XmlAttribute> &_attribute, const std::string &_name)
 {
   bool added{};
   auto iterator = this->attributes.begin();
@@ -39,7 +39,7 @@ bool ls_std::XMLNode::addAttributeAfter(const std::shared_ptr<ls_std::XMLAttribu
   return added;
 }
 
-bool ls_std::XMLNode::addAttributeBefore(const std::shared_ptr<ls_std::XMLAttribute> &_attribute, const std::string &_name)
+bool ls_std::XmlNode::addAttributeBefore(const std::shared_ptr<ls_std::XmlAttribute> &_attribute, const std::string &_name)
 {
   bool added{};
   auto iterator = this->attributes.begin();
@@ -62,7 +62,7 @@ bool ls_std::XMLNode::addAttributeBefore(const std::shared_ptr<ls_std::XMLAttrib
   return added;
 }
 
-bool ls_std::XMLNode::addAttributeToBeginning(const std::shared_ptr<ls_std::XMLAttribute> &_attribute)
+bool ls_std::XmlNode::addAttributeToBeginning(const std::shared_ptr<ls_std::XmlAttribute> &_attribute)
 {
   bool added{};
 
@@ -75,7 +75,7 @@ bool ls_std::XMLNode::addAttributeToBeginning(const std::shared_ptr<ls_std::XMLA
   return added;
 }
 
-bool ls_std::XMLNode::addAttributeToEnd(const std::shared_ptr<ls_std::XMLAttribute> &_attribute)
+bool ls_std::XmlNode::addAttributeToEnd(const std::shared_ptr<ls_std::XmlAttribute> &_attribute)
 {
   bool added{};
 
@@ -88,7 +88,7 @@ bool ls_std::XMLNode::addAttributeToEnd(const std::shared_ptr<ls_std::XMLAttribu
   return added;
 }
 
-bool ls_std::XMLNode::addChildAfter(const std::shared_ptr<ls_std::XMLNode> &_child, const std::shared_ptr<ls_std::XMLNode> &_search)
+bool ls_std::XmlNode::addChildAfter(const std::shared_ptr<ls_std::XmlNode> &_child, const std::shared_ptr<ls_std::XmlNode> &_search)
 {
   bool added{};
   auto iterator = this->children.begin();
@@ -112,7 +112,7 @@ bool ls_std::XMLNode::addChildAfter(const std::shared_ptr<ls_std::XMLNode> &_chi
   return added;
 }
 
-bool ls_std::XMLNode::addChildBefore(const std::shared_ptr<ls_std::XMLNode> &_child, const std::shared_ptr<ls_std::XMLNode> &_search)
+bool ls_std::XmlNode::addChildBefore(const std::shared_ptr<ls_std::XmlNode> &_child, const std::shared_ptr<ls_std::XmlNode> &_search)
 {
   bool added{};
   auto iterator = this->children.begin();
@@ -135,7 +135,7 @@ bool ls_std::XMLNode::addChildBefore(const std::shared_ptr<ls_std::XMLNode> &_ch
   return added;
 }
 
-bool ls_std::XMLNode::addChildToBeginning(const std::shared_ptr<ls_std::XMLNode> &_child)
+bool ls_std::XmlNode::addChildToBeginning(const std::shared_ptr<ls_std::XmlNode> &_child)
 {
   bool added{};
 
@@ -148,7 +148,7 @@ bool ls_std::XMLNode::addChildToBeginning(const std::shared_ptr<ls_std::XMLNode>
   return added;
 }
 
-bool ls_std::XMLNode::addChildToEnd(const std::shared_ptr<ls_std::XMLNode> &_child)
+bool ls_std::XmlNode::addChildToEnd(const std::shared_ptr<ls_std::XmlNode> &_child)
 {
   bool added{};
 
@@ -161,24 +161,24 @@ bool ls_std::XMLNode::addChildToEnd(const std::shared_ptr<ls_std::XMLNode> &_chi
   return added;
 }
 
-void ls_std::XMLNode::clearValue()
+void ls_std::XmlNode::clearValue()
 {
   this->value.clear();
 }
 
-std::list<std::shared_ptr<ls_std::XMLAttribute>> ls_std::XMLNode::getAttributes()
+std::list<std::shared_ptr<ls_std::XmlAttribute>> ls_std::XmlNode::getAttributes()
 {
   return this->attributes;
 }
 
-std::list<std::shared_ptr<ls_std::XMLNode>> ls_std::XMLNode::getChildren()
+std::list<std::shared_ptr<ls_std::XmlNode>> ls_std::XmlNode::getChildren()
 {
   return this->children;
 }
 
-std::list<std::shared_ptr<ls_std::XMLNode>> ls_std::XMLNode::getChildren(const std::string &_name)
+std::list<std::shared_ptr<ls_std::XmlNode>> ls_std::XmlNode::getChildren(const std::string &_name)
 {
-  std::list<std::shared_ptr<ls_std::XMLNode>> childrenWithName{};
+  std::list<std::shared_ptr<ls_std::XmlNode>> childrenWithName{};
 
   for (const auto &child : this->children)
   {
@@ -191,32 +191,32 @@ std::list<std::shared_ptr<ls_std::XMLNode>> ls_std::XMLNode::getChildren(const s
   return childrenWithName;
 }
 
-std::string ls_std::XMLNode::getName()
+std::string ls_std::XmlNode::getName()
 {
   return this->name;
 }
 
-std::string ls_std::XMLNode::getValue()
+std::string ls_std::XmlNode::getValue()
 {
   return this->value;
 }
 
-bool ls_std::XMLNode::hasAttribute(const std::string &_name)
+bool ls_std::XmlNode::hasAttribute(const std::string &_name)
 {
   return this->_hasAttribute(_name);
 }
 
-bool ls_std::XMLNode::hasChild(const std::string &_name)
+bool ls_std::XmlNode::hasChild(const std::string &_name)
 {
   return this->_hasChild(_name);
 }
 
-bool ls_std::XMLNode::hasChild(const std::shared_ptr<ls_std::XMLNode> &_child)
+bool ls_std::XmlNode::hasChild(const std::shared_ptr<ls_std::XmlNode> &_child)
 {
   return this->_hasChild(_child);
 }
 
-void ls_std::XMLNode::removeFirstAttribute()
+void ls_std::XmlNode::removeFirstAttribute()
 {
   if (!this->attributes.empty())
   {
@@ -224,7 +224,7 @@ void ls_std::XMLNode::removeFirstAttribute()
   }
 }
 
-void ls_std::XMLNode::removeLastAttribute()
+void ls_std::XmlNode::removeLastAttribute()
 {
   if (!this->attributes.empty())
   {
@@ -232,7 +232,7 @@ void ls_std::XMLNode::removeLastAttribute()
   }
 }
 
-void ls_std::XMLNode::removeFirstChild()
+void ls_std::XmlNode::removeFirstChild()
 {
   if (!this->children.empty())
   {
@@ -240,7 +240,7 @@ void ls_std::XMLNode::removeFirstChild()
   }
 }
 
-void ls_std::XMLNode::removeLastChild()
+void ls_std::XmlNode::removeLastChild()
 {
   if (!this->children.empty())
   {
@@ -248,38 +248,38 @@ void ls_std::XMLNode::removeLastChild()
   }
 }
 
-void ls_std::XMLNode::setName(std::string _name)
+void ls_std::XmlNode::setName(std::string _name)
 {
   this->name = std::move(_name);
 }
 
-void ls_std::XMLNode::setValue(std::string _value)
+void ls_std::XmlNode::setValue(std::string _value)
 {
   this->value = std::move(_value);
 }
 
-std::string ls_std::XMLNode::toXML()
+std::string ls_std::XmlNode::toXml()
 {
-  return this->_toXML_(0);
+  return this->_toXml_(0);
 }
 
-std::string ls_std::XMLNode::_toXML_(uint8_t _tabSize)
+std::string ls_std::XmlNode::_toXml_(uint8_t _tabSize)
 {
   std::string xmlStream{};
 
-  xmlStream += ls_std::XMLNode::_getTab(_tabSize);
-  xmlStream += this->_toXMLOpenTag();
-  xmlStream += this->_toXMLAttributes();
-  xmlStream += this->_toXMLOpenTagClose();
-  xmlStream += this->_toXMLValue();
-  xmlStream += this->_toXMLChildren(_tabSize + TAB_SIZE);
-  xmlStream += this->value.empty() ? ls_std::XMLNode::_getTab(_tabSize) : "";
-  xmlStream += this->_toXMLCloseTag() + "\n";
+  xmlStream += ls_std::XmlNode::_getTab(_tabSize);
+  xmlStream += this->_toXmlOpenTag();
+  xmlStream += this->_toXmlAttributes();
+  xmlStream += this->_toXmlOpenTagClose();
+  xmlStream += this->_toXmlValue();
+  xmlStream += this->_toXmlChildren(_tabSize + TAB_SIZE);
+  xmlStream += this->value.empty() ? ls_std::XmlNode::_getTab(_tabSize) : "";
+  xmlStream += this->_toXmlCloseTag() + "\n";
 
   return xmlStream;
 }
 
-std::string ls_std::XMLNode::_getTab(uint8_t _tabSize)
+std::string ls_std::XmlNode::_getTab(uint8_t _tabSize)
 {
   std::string tab{};
 
@@ -291,7 +291,7 @@ std::string ls_std::XMLNode::_getTab(uint8_t _tabSize)
   return tab;
 }
 
-bool ls_std::XMLNode::_hasAttribute(const std::string &_name)
+bool ls_std::XmlNode::_hasAttribute(const std::string &_name)
 {
   bool exists{};
 
@@ -307,12 +307,12 @@ bool ls_std::XMLNode::_hasAttribute(const std::string &_name)
   return exists;
 }
 
-bool ls_std::XMLNode::_hasChild(const std::shared_ptr<ls_std::XMLNode> &_child)
+bool ls_std::XmlNode::_hasChild(const std::shared_ptr<ls_std::XmlNode> &_child)
 {
   return ls_std::STLUtils::contains(this->children, _child);
 }
 
-bool ls_std::XMLNode::_hasChild(const std::string &_name)
+bool ls_std::XmlNode::_hasChild(const std::string &_name)
 {
   bool exists{};
 
@@ -328,19 +328,19 @@ bool ls_std::XMLNode::_hasChild(const std::string &_name)
   return exists;
 }
 
-std::string ls_std::XMLNode::_toXMLAttributes()
+std::string ls_std::XmlNode::_toXmlAttributes()
 {
   std::string stream{};
 
   for (const auto &_attribute : this->attributes)
   {
-    stream += " " + _attribute->toXML();
+    stream += " " + _attribute->toXml();
   }
 
   return stream;
 }
 
-std::string ls_std::XMLNode::_toXMLChildren(uint8_t _tabSize)
+std::string ls_std::XmlNode::_toXmlChildren(uint8_t _tabSize)
 {
   std::string stream{};
 
@@ -348,14 +348,14 @@ std::string ls_std::XMLNode::_toXMLChildren(uint8_t _tabSize)
   {
     for (const auto &_child : this->children)
     {
-      stream += _child->_toXML_(_tabSize);
+      stream += _child->_toXml_(_tabSize);
     }
   }
 
   return stream;
 }
 
-std::string ls_std::XMLNode::_toXMLCloseTag()
+std::string ls_std::XmlNode::_toXmlCloseTag()
 {
   std::string stream{};
 
@@ -367,12 +367,12 @@ std::string ls_std::XMLNode::_toXMLCloseTag()
   return stream;
 }
 
-std::string ls_std::XMLNode::_toXMLOpenTag()
+std::string ls_std::XmlNode::_toXmlOpenTag()
 {
   return "<" + this->name;
 }
 
-std::string ls_std::XMLNode::_toXMLOpenTagClose()
+std::string ls_std::XmlNode::_toXmlOpenTagClose()
 {
   std::string stream{};
 
@@ -388,7 +388,7 @@ std::string ls_std::XMLNode::_toXMLOpenTagClose()
   return stream;
 }
 
-std::string ls_std::XMLNode::_toXMLValue()
+std::string ls_std::XmlNode::_toXmlValue()
 {
   return this->value.empty() ? "\n" : this->value;
 }

+ 52 - 52
source/ls_std/io/xml/XMLParser.cpp → source/ls_std/io/xml/XmlParser.cpp

@@ -3,48 +3,48 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-26
- * Changed:         2021-04-23
+ * Changed:         2021-05-02
  *
  * */
 
-#include <ls_std/io/xml/XMLParser.hpp>
+#include <ls_std/io/xml/XmlParser.hpp>
 #include <ls_std/exception/IllegalArgumentException.hpp>
 #include <ls_std/boxing/String.hpp>
 
-ls_std::XMLParser::XMLParser(const std::shared_ptr<ls_std::XMLDocument> &_document) : ls_std::Class("XMLParser")
+ls_std::XmlParser::XmlParser(const std::shared_ptr<ls_std::XmlDocument> &_document) : ls_std::Class("XmlParser")
 {
   this->_assignDocument(_document);
   this->_reset();
 }
 
-std::shared_ptr<ls_std::XMLDocument> ls_std::XMLParser::getDocument()
+std::shared_ptr<ls_std::XmlDocument> ls_std::XmlParser::getDocument()
 {
   return this->document;
 }
 
-void ls_std::XMLParser::parse(const ls_std::byte_field &_data)
+void ls_std::XmlParser::parse(const ls_std::byte_field &_data)
 {
   this->_parse(_data);
   this->_mergeNodes();
   this->_reset();
 }
 
-void ls_std::XMLParser::setDocument(const std::shared_ptr<ls_std::XMLDocument> &_document)
+void ls_std::XmlParser::setDocument(const std::shared_ptr<ls_std::XmlDocument> &_document)
 {
   this->_assignDocument(_document);
 }
 
-std::pair<std::string, std::string> ls_std::XMLParser::_readAttribute_(const ls_std::byte_field &_data)
+std::pair<std::string, std::string> ls_std::XmlParser::_readAttribute_(const ls_std::byte_field &_data)
 {
-  return ls_std::XMLParser::_parseAttribute(_data);
+  return ls_std::XmlParser::_parseAttribute(_data);
 }
 
-std::list<std::pair<std::string, std::string>> ls_std::XMLParser::_readAttributes_(ls_std::byte_field _data)
+std::list<std::pair<std::string, std::string>> ls_std::XmlParser::_readAttributes_(ls_std::byte_field _data)
 {
-  return ls_std::XMLParser::_parseAttributes(std::move(_data));
+  return ls_std::XmlParser::_parseAttributes(std::move(_data));
 }
 
-void ls_std::XMLParser::_analyze(const ls_std::byte_field &_data, std::string::size_type _index)
+void ls_std::XmlParser::_analyze(const ls_std::byte_field &_data, std::string::size_type _index)
 {
   this->_isDeclaration(_data, _index);
   this->_isClosingTag(_data, _index);
@@ -52,7 +52,7 @@ void ls_std::XMLParser::_analyze(const ls_std::byte_field &_data, std::string::s
   this->_isValue(_data, _index);
 }
 
-void ls_std::XMLParser::_assignDocument(const std::shared_ptr<ls_std::XMLDocument> &_document)
+void ls_std::XmlParser::_assignDocument(const std::shared_ptr<ls_std::XmlDocument> &_document)
 {
   if (_document == nullptr)
   {
@@ -62,24 +62,24 @@ void ls_std::XMLParser::_assignDocument(const std::shared_ptr<ls_std::XMLDocumen
   this->document = _document;
 }
 
-std::shared_ptr<ls_std::XMLDeclaration> ls_std::XMLParser::_createDeclaration(const std::list<std::pair<std::string, std::string>> &_attributes)
+std::shared_ptr<ls_std::XmlDeclaration> ls_std::XmlParser::_createDeclaration(const std::list<std::pair<std::string, std::string>> &_attributes)
 {
-  std::shared_ptr<ls_std::XMLDeclaration> declaration = std::make_shared<ls_std::XMLDeclaration>("1.0");
-  std::pair<std::string, std::string> attribute = ls_std::XMLParser::_findAttribute(_attributes, "version");
+  std::shared_ptr<ls_std::XmlDeclaration> declaration = std::make_shared<ls_std::XmlDeclaration>("1.0");
+  std::pair<std::string, std::string> attribute = ls_std::XmlParser::_findAttribute(_attributes, "version");
 
   if (!attribute.first.empty())
   {
     declaration->setVersion(attribute.second);
   }
 
-  attribute = ls_std::XMLParser::_findAttribute(_attributes, "encoding");
+  attribute = ls_std::XmlParser::_findAttribute(_attributes, "encoding");
 
   if (!attribute.first.empty())
   {
     declaration->setEncoding(attribute.second);
   }
 
-  attribute = ls_std::XMLParser::_findAttribute(_attributes, "standalone");
+  attribute = ls_std::XmlParser::_findAttribute(_attributes, "standalone");
 
   if (!attribute.first.empty())
   {
@@ -89,14 +89,14 @@ std::shared_ptr<ls_std::XMLDeclaration> ls_std::XMLParser::_createDeclaration(co
   return declaration;
 }
 
-std::shared_ptr<ls_std::XMLNode> ls_std::XMLParser::_createNode(const std::list<std::pair<std::string, std::string>> &_attributes, const std::string &_name)
+std::shared_ptr<ls_std::XmlNode> ls_std::XmlParser::_createNode(const std::list<std::pair<std::string, std::string>> &_attributes, const std::string &_name)
 {
-  std::shared_ptr<ls_std::XMLNode> node = std::make_shared<ls_std::XMLNode>(_name);
-  std::shared_ptr<ls_std::XMLAttribute> attribute{};
+  std::shared_ptr<ls_std::XmlNode> node = std::make_shared<ls_std::XmlNode>(_name);
+  std::shared_ptr<ls_std::XmlAttribute> attribute{};
 
   for (const auto &parsedAttribute : _attributes)
   {
-    attribute = std::make_shared<ls_std::XMLAttribute>(parsedAttribute.first);
+    attribute = std::make_shared<ls_std::XmlAttribute>(parsedAttribute.first);
     attribute->setValue(parsedAttribute.second);
     node->addAttributeToEnd(attribute);
   }
@@ -104,7 +104,7 @@ std::shared_ptr<ls_std::XMLNode> ls_std::XMLParser::_createNode(const std::list<
   return node;
 }
 
-std::pair<std::string, std::string> ls_std::XMLParser::_findAttribute(const std::list<std::pair<std::string, std::string>> &_attributes, const std::string &_name)
+std::pair<std::string, std::string> ls_std::XmlParser::_findAttribute(const std::list<std::pair<std::string, std::string>> &_attributes, const std::string &_name)
 {
   std::pair<std::string, std::string> attribute{};
 
@@ -120,7 +120,7 @@ std::pair<std::string, std::string> ls_std::XMLParser::_findAttribute(const std:
   return attribute;
 }
 
-size_t ls_std::XMLParser::_findAttributeEndPosition(const ls_std::byte_field &_data)
+size_t ls_std::XmlParser::_findAttributeEndPosition(const ls_std::byte_field &_data)
 {
   std::string::size_type position = std::string::npos;
   std::string::size_type counter{};
@@ -143,7 +143,7 @@ size_t ls_std::XMLParser::_findAttributeEndPosition(const ls_std::byte_field &_d
   return position;
 }
 
-ls_std::byte_field ls_std::XMLParser::_getNextTagString(const ls_std::byte_field &_data, std::string::size_type _index)
+ls_std::byte_field ls_std::XmlParser::_getNextTagString(const ls_std::byte_field &_data, std::string::size_type _index)
 {
   ls_std::byte_field tag{};
   size_t closingCharacterPosition = _index + _data.substr(_index).find('>');
@@ -156,7 +156,7 @@ ls_std::byte_field ls_std::XMLParser::_getNextTagString(const ls_std::byte_field
   return tag;
 }
 
-void ls_std::XMLParser::_isClosingTag(const ls_std::byte_field &_data, std::string::size_type _index)
+void ls_std::XmlParser::_isClosingTag(const ls_std::byte_field &_data, std::string::size_type _index)
 {
   if (this->mode == XML_PARSE_MODE_ANALYZE && _data.substr(_index, 2) == "</")
   {
@@ -164,7 +164,7 @@ void ls_std::XMLParser::_isClosingTag(const ls_std::byte_field &_data, std::stri
   }
 }
 
-void ls_std::XMLParser::_isDeclaration(const ls_std::byte_field &_data, std::string::size_type _index)
+void ls_std::XmlParser::_isDeclaration(const ls_std::byte_field &_data, std::string::size_type _index)
 {
   if (_data.substr(_index, 5) == "<?xml")
   {
@@ -172,7 +172,7 @@ void ls_std::XMLParser::_isDeclaration(const ls_std::byte_field &_data, std::str
   }
 }
 
-void ls_std::XMLParser::_isOpeningTag(const ls_std::byte_field &_data, std::string::size_type _index)
+void ls_std::XmlParser::_isOpeningTag(const ls_std::byte_field &_data, std::string::size_type _index)
 {
   if (this->mode == XML_PARSE_MODE_ANALYZE && _data.substr(_index, 1) == "<")
   {
@@ -180,7 +180,7 @@ void ls_std::XMLParser::_isOpeningTag(const ls_std::byte_field &_data, std::stri
   }
 }
 
-void ls_std::XMLParser::_isValue(const ls_std::byte_field &_data, std::string::size_type _index)
+void ls_std::XmlParser::_isValue(const ls_std::byte_field &_data, std::string::size_type _index)
 {
   if (this->mode == XML_PARSE_MODE_ANALYZE)
   {
@@ -199,7 +199,7 @@ void ls_std::XMLParser::_isValue(const ls_std::byte_field &_data, std::string::s
   }
 }
 
-void ls_std::XMLParser::_mergeNodes()
+void ls_std::XmlParser::_mergeNodes()
 {
   while (this->maxLevel > 1)
   {
@@ -210,7 +210,7 @@ void ls_std::XMLParser::_mergeNodes()
   this->document->setRootElement(this->parseData.front().node);
 }
 
-void ls_std::XMLParser::_mergeChildrenToParentNode(const std::shared_ptr<ls_std::XMLNode> &_parent, std::list<ls_std::XMLParseData>::iterator &_iterator, uint8_t _parentLevel)
+void ls_std::XmlParser::_mergeChildrenToParentNode(const std::shared_ptr<ls_std::XmlNode> &_parent, std::list<ls_std::XmlParseData>::iterator &_iterator, uint8_t _parentLevel)
 {
   do
   {
@@ -230,7 +230,7 @@ void ls_std::XMLParser::_mergeChildrenToParentNode(const std::shared_ptr<ls_std:
   } while (_iterator->level > _parentLevel);
 }
 
-void ls_std::XMLParser::_mergeNodesOnCurrentLevel()
+void ls_std::XmlParser::_mergeNodesOnCurrentLevel()
 {
   auto iterator = this->parseData.begin();
   uint8_t parentLevel = this->maxLevel - 1;
@@ -248,7 +248,7 @@ void ls_std::XMLParser::_mergeNodesOnCurrentLevel()
   }
 }
 
-void ls_std::XMLParser::_parse(const ls_std::byte_field &_data)
+void ls_std::XmlParser::_parse(const ls_std::byte_field &_data)
 {
   for (std::string::size_type index = 0; index < _data.size(); index++)
   {
@@ -269,21 +269,21 @@ void ls_std::XMLParser::_parse(const ls_std::byte_field &_data)
       case XML_PARSE_MODE_OPENING_TAG:
       {
         --index;
-        index = ls_std::XMLParser::_parseOpeningTag(_data, index);
+        index = ls_std::XmlParser::_parseOpeningTag(_data, index);
         this->mode = XML_PARSE_MODE_ANALYZE;
       }
         break;
       case XML_PARSE_MODE_VALUE:
       {
         --index;
-        index = ls_std::XMLParser::_parseValue(_data, index);
+        index = ls_std::XmlParser::_parseValue(_data, index);
         this->mode = XML_PARSE_MODE_ANALYZE;
       }
         break;
       case XML_PARSE_MODE_CLOSING_TAG:
       {
         --index;
-        index = ls_std::XMLParser::_parseClosingTag(_data, index);
+        index = ls_std::XmlParser::_parseClosingTag(_data, index);
         this->mode = XML_PARSE_MODE_ANALYZE;
       }
         break;
@@ -291,7 +291,7 @@ void ls_std::XMLParser::_parse(const ls_std::byte_field &_data)
   }
 }
 
-std::pair<std::string, std::string> ls_std::XMLParser::_parseAttribute(const ls_std::byte_field &_data)
+std::pair<std::string, std::string> ls_std::XmlParser::_parseAttribute(const ls_std::byte_field &_data)
 {
   std::pair<std::string, std::string> parsedAttribute{};
   parsedAttribute.first = _data.substr(0, _data.find('='));
@@ -301,7 +301,7 @@ std::pair<std::string, std::string> ls_std::XMLParser::_parseAttribute(const ls_
   return parsedAttribute;
 }
 
-std::list<std::pair<std::string, std::string>> ls_std::XMLParser::_parseAttributes(ls_std::byte_field _data)
+std::list<std::pair<std::string, std::string>> ls_std::XmlParser::_parseAttributes(ls_std::byte_field _data)
 {
   std::list<std::pair<std::string, std::string>> attributes{};
   size_t position = _data.find(' ');
@@ -319,44 +319,44 @@ std::list<std::pair<std::string, std::string>> ls_std::XMLParser::_parseAttribut
       break;
     }
 
-    std::string attributeString = _data.substr(position, ls_std::XMLParser::_findAttributeEndPosition(_data) + 1);
-    attributes.push_back(ls_std::XMLParser::_parseAttribute(attributeString));
+    std::string attributeString = _data.substr(position, ls_std::XmlParser::_findAttributeEndPosition(_data) + 1);
+    attributes.push_back(ls_std::XmlParser::_parseAttribute(attributeString));
     _data = _data.substr(position + attributeString.size());
   }
 
   return attributes;
 }
 
-size_t ls_std::XMLParser::_parseClosingTag(const ls_std::byte_field &_data, std::string::size_type _index)
+size_t ls_std::XmlParser::_parseClosingTag(const ls_std::byte_field &_data, std::string::size_type _index)
 {
-  std::string tagString = ls_std::XMLParser::_getNextTagString(_data, _index);
+  std::string tagString = ls_std::XmlParser::_getNextTagString(_data, _index);
   this->currentLevel -= 1;
   return tagString.empty() ? _index : _index + (tagString.size() - 1);
 }
 
-size_t ls_std::XMLParser::_parseDeclaration(const ls_std::byte_field &_data, std::string::size_type _index)
+size_t ls_std::XmlParser::_parseDeclaration(const ls_std::byte_field &_data, std::string::size_type _index)
 {
-  std::string tagString = ls_std::XMLParser::_getNextTagString(_data, _index);
+  std::string tagString = ls_std::XmlParser::_getNextTagString(_data, _index);
   bool isValidTagString = !tagString.empty();
 
   if (isValidTagString)
   {
-    std::shared_ptr<ls_std::XMLDeclaration> declaration = this->_createDeclaration(ls_std::XMLParser::_parseAttributes(tagString));
+    std::shared_ptr<ls_std::XmlDeclaration> declaration = this->_createDeclaration(ls_std::XmlParser::_parseAttributes(tagString));
     this->document->setDeclaration(declaration);
   }
 
   return !isValidTagString ? _index : _index + (tagString.size() - 1);
 }
 
-size_t ls_std::XMLParser::_parseOpeningTag(const ls_std::byte_field &_data, std::string::size_type _index)
+size_t ls_std::XmlParser::_parseOpeningTag(const ls_std::byte_field &_data, std::string::size_type _index)
 {
-  ls_std::String tagString{ls_std::XMLParser::_getNextTagString(_data, _index)};
+  ls_std::String tagString{ls_std::XmlParser::_getNextTagString(_data, _index)};
   bool isValidTagString = !tagString.toString().empty();
-  ls_std::XMLParseData singleParseData{};
+  ls_std::XmlParseData singleParseData{};
 
   if (isValidTagString)
   {
-    std::shared_ptr<ls_std::XMLNode> node = ls_std::XMLParser::_createNode(ls_std::XMLParser::_parseAttributes(tagString), ls_std::XMLParser::_parseTagName(tagString));
+    std::shared_ptr<ls_std::XmlNode> node = ls_std::XmlParser::_createNode(ls_std::XmlParser::_parseAttributes(tagString), ls_std::XmlParser::_parseTagName(tagString));
 
     singleParseData.level = this->currentLevel;
     singleParseData.node = node;
@@ -372,7 +372,7 @@ size_t ls_std::XMLParser::_parseOpeningTag(const ls_std::byte_field &_data, std:
   return !isValidTagString ? _index : _index + (tagString.toString().size() - 1);
 }
 
-ls_std::byte_field ls_std::XMLParser::_parseTagName(const ls_std::byte_field &_data)
+ls_std::byte_field ls_std::XmlParser::_parseTagName(const ls_std::byte_field &_data)
 {
   std::string::size_type position = _data.find(' ');
 
@@ -384,7 +384,7 @@ ls_std::byte_field ls_std::XMLParser::_parseTagName(const ls_std::byte_field &_d
   return _data.substr(1, position - 1);
 }
 
-size_t ls_std::XMLParser::_parseValue(const ls_std::byte_field &_data, std::string::size_type _index)
+size_t ls_std::XmlParser::_parseValue(const ls_std::byte_field &_data, std::string::size_type _index)
 {
   ls_std::byte_field value = _data.substr(_index, _data.substr(_index).find('<'));
   this->parseData.back().node->setValue(value);
@@ -392,7 +392,7 @@ size_t ls_std::XMLParser::_parseValue(const ls_std::byte_field &_data, std::stri
   return _index + (value.size() - 1);
 }
 
-void ls_std::XMLParser::_reset()
+void ls_std::XmlParser::_reset()
 {
   this->currentLevel = 1;
   this->maxLevel = 1;
@@ -400,7 +400,7 @@ void ls_std::XMLParser::_reset()
   this->parseData.clear();
 }
 
-void ls_std::XMLParser::_setMaxLevel()
+void ls_std::XmlParser::_setMaxLevel()
 {
   if (this->currentLevel > this->maxLevel)
   {

+ 23 - 0
source/ls_std/io/xml/XmlParserMock.cpp

@@ -0,0 +1,23 @@
+/*
+ * Author:          Patrick-Christopher Mattulat
+ * Company:         Lynar Studios
+ * E-Mail:          webmaster@lynarstudios.com
+ * Created:         2020-10-18
+ * Changed:         2021-05-02
+ *
+ * */
+
+#include <ls_std/io/xml/XmlParserMock.hpp>
+
+ls_std::XmlParserMock::XmlParserMock() : ls_std::XmlParser(nullptr)
+{}
+
+std::pair<std::string, std::string> ls_std::XmlParserMock::readAttribute(const ls_std::byte_field &_data)
+{
+  return ls_std::XmlParser::_readAttribute_(_data);
+}
+
+std::list<std::pair<std::string, std::string>> ls_std::XmlParserMock::readAttributes(ls_std::byte_field _data)
+{
+  return ls_std::XmlParser::_readAttributes_(std::move(_data));
+}

+ 12 - 12
source/ls_std/io/xml/XMLReader.cpp → source/ls_std/io/xml/XmlReader.cpp

@@ -3,48 +3,48 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-10
- * Changed:         2021-04-23
+ * Changed:         2021-05-02
  *
  * */
 
-#include <ls_std/io/xml/XMLReader.hpp>
+#include <ls_std/io/xml/XmlReader.hpp>
 #include <ls_std/exception/IllegalArgumentException.hpp>
 #include <ls_std/io/FileReader.hpp>
 #include <ls_std/boxing/String.hpp>
-#include <ls_std/io/xml/XMLParser.hpp>
+#include <ls_std/io/xml/XmlParser.hpp>
 
-ls_std::XMLReader::XMLReader(const std::shared_ptr<ls_std::XMLDocument> &_document, const std::string &_absolutePath)
-    : ls_std::Class("XMLReader"),
+ls_std::XmlReader::XmlReader(const std::shared_ptr<ls_std::XmlDocument> &_document, const std::string &_absolutePath)
+    : ls_std::Class("XmlReader"),
       xmlFile(ls_std::File{""})
 {
   this->_assignDocument(_document);
   this->_assignFile(ls_std::File{_absolutePath});
 }
 
-ls_std::byte_field ls_std::XMLReader::read()
+ls_std::byte_field ls_std::XmlReader::read()
 {
   ls_std::byte_field data = ls_std::FileReader{this->xmlFile}.read();
-  ls_std::XMLParser{this->document}.parse(data);
+  ls_std::XmlParser{this->document}.parse(data);
 
   return data;
 }
 
-std::shared_ptr<ls_std::XMLDocument> ls_std::XMLReader::getDocument()
+std::shared_ptr<ls_std::XmlDocument> ls_std::XmlReader::getDocument()
 {
   return this->document;
 }
 
-void ls_std::XMLReader::setDocument(const std::shared_ptr<ls_std::XMLDocument> &_document)
+void ls_std::XmlReader::setDocument(const std::shared_ptr<ls_std::XmlDocument> &_document)
 {
   this->_assignDocument(_document);
 }
 
-void ls_std::XMLReader::setFile(const ls_std::File &_xmlFile)
+void ls_std::XmlReader::setFile(const ls_std::File &_xmlFile)
 {
   this->_assignFile(_xmlFile);
 }
 
-void ls_std::XMLReader::_assignDocument(const std::shared_ptr<ls_std::XMLDocument> &_document)
+void ls_std::XmlReader::_assignDocument(const std::shared_ptr<ls_std::XmlDocument> &_document)
 {
   if (_document == nullptr)
   {
@@ -54,7 +54,7 @@ void ls_std::XMLReader::_assignDocument(const std::shared_ptr<ls_std::XMLDocumen
   this->document = _document;
 }
 
-void ls_std::XMLReader::_assignFile(ls_std::File _xmlFile)
+void ls_std::XmlReader::_assignFile(ls_std::File _xmlFile)
 {
   if (!_xmlFile.exists())
   {

+ 13 - 13
test/TestDataFactory.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-16
- * Changed:         2021-04-23
+ * Changed:         2021-05-02
  *
  * */
 
@@ -39,31 +39,31 @@ ls_std::StateMachine ls_std_test::TestDataFactory::createStateMachine()
   return stateMachine;
 }
 
-std::shared_ptr<ls_std::XMLNode> ls_std_test::TestDataFactory::createXMLContent()
+std::shared_ptr<ls_std::XmlNode> ls_std_test::TestDataFactory::createXmlContent()
 {
-  std::shared_ptr<ls_std::XMLNode> root = std::make_shared<ls_std::XMLNode>("dialog");
-  std::shared_ptr<ls_std::XMLAttribute> attribute{};
-  std::shared_ptr<ls_std::XMLNode> child{};
-  std::shared_ptr<ls_std::XMLNode> text{};
+  std::shared_ptr<ls_std::XmlNode> root = std::make_shared<ls_std::XmlNode>("dialog");
+  std::shared_ptr<ls_std::XmlAttribute> attribute{};
+  std::shared_ptr<ls_std::XmlNode> child{};
+  std::shared_ptr<ls_std::XmlNode> text{};
 
-  attribute = std::make_shared<ls_std::XMLAttribute>("name");
+  attribute = std::make_shared<ls_std::XmlAttribute>("name");
   attribute->setValue("dungeon_001");
   root->addAttributeToEnd(attribute);
 
-  child = std::make_shared<ls_std::XMLNode>("dialogUnit");
-  attribute = std::make_shared<ls_std::XMLAttribute>("id");
+  child = std::make_shared<ls_std::XmlNode>("dialogUnit");
+  attribute = std::make_shared<ls_std::XmlAttribute>("id");
   attribute->setValue("001");
   child->addAttributeToEnd(attribute);
-  text = std::make_shared<ls_std::XMLNode>("text");
+  text = std::make_shared<ls_std::XmlNode>("text");
   text->setValue("Hello!");
   child->addChildToEnd(text);
   root->addChildToEnd(child);
 
-  child = std::make_shared<ls_std::XMLNode>("dialogUnit");
-  attribute = std::make_shared<ls_std::XMLAttribute>("id");
+  child = std::make_shared<ls_std::XmlNode>("dialogUnit");
+  attribute = std::make_shared<ls_std::XmlAttribute>("id");
   attribute->setValue("002");
   child->addAttributeToEnd(attribute);
-  text = std::make_shared<ls_std::XMLNode>("text");
+  text = std::make_shared<ls_std::XmlNode>("text");
   text->setValue("Hello again!");
   child->addChildToEnd(text);
   root->addChildToEnd(child);

+ 2 - 2
test/TestDataFactory.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-16
- * Changed:         2021-04-23
+ * Changed:         2021-05-02
  *
  * */
 
@@ -22,7 +22,7 @@ namespace ls_std_test
       ~TestDataFactory() = default;
 
       static ls_std::StateMachine createStateMachine();
-      static std::shared_ptr<ls_std::XMLNode> createXMLContent();
+      static std::shared_ptr<ls_std::XmlNode> createXmlContent();
   };
 }
 

+ 15 - 15
test/cases/io/xml/XMLAttributeTest.cpp → test/cases/io/xml/XmlAttributeTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-23
- * Changed:         2021-04-23
+ * Changed:         2021-05-02
  *
  * */
 
@@ -12,12 +12,12 @@
 
 namespace
 {
-  class XMLAttributeTest : public ::testing::Test
+  class XmlAttributeTest : public ::testing::Test
   {
     protected:
 
-      XMLAttributeTest() = default;
-      ~XMLAttributeTest() override = default;
+      XmlAttributeTest() = default;
+      ~XmlAttributeTest() override = default;
 
       void SetUp() override
       {}
@@ -26,39 +26,39 @@ namespace
       {}
   };
 
-  TEST_F(XMLAttributeTest, getName)
+  TEST_F(XmlAttributeTest, getName)
   {
-    ls_std::XMLAttribute attribute{"id"};
+    ls_std::XmlAttribute attribute{"id"};
     ASSERT_STREQ("id", attribute.getName().c_str());
   }
 
-  TEST_F(XMLAttributeTest, getValue)
+  TEST_F(XmlAttributeTest, getValue)
   {
-    ls_std::XMLAttribute attribute{"id"};
+    ls_std::XmlAttribute attribute{"id"};
     ASSERT_TRUE(attribute.getValue().empty());
   }
 
-  TEST_F(XMLAttributeTest, setName)
+  TEST_F(XmlAttributeTest, setName)
   {
-    ls_std::XMLAttribute attribute{"id"};
+    ls_std::XmlAttribute attribute{"id"};
     attribute.setName("id2");
 
     ASSERT_STREQ("id2", attribute.getName().c_str());
   }
 
-  TEST_F(XMLAttributeTest, setValue)
+  TEST_F(XmlAttributeTest, setValue)
   {
-    ls_std::XMLAttribute attribute{"id"};
+    ls_std::XmlAttribute attribute{"id"};
     attribute.setValue("some_content");
 
     ASSERT_STREQ("some_content", attribute.getValue().c_str());
   }
 
-  TEST_F(XMLAttributeTest, toXML)
+  TEST_F(XmlAttributeTest, toXml)
   {
-    ls_std::XMLAttribute attribute{"id"};
+    ls_std::XmlAttribute attribute{"id"};
     attribute.setValue("some_content");
 
-    ASSERT_STREQ(R"(id="some_content")", attribute.toXML().c_str());
+    ASSERT_STREQ(R"(id="some_content")", attribute.toXml().c_str());
   }
 }

+ 21 - 21
test/cases/io/xml/XMLDeclarationTest.cpp → test/cases/io/xml/XmlDeclarationTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-29
- * Changed:         2021-04-23
+ * Changed:         2021-05-02
  *
  * */
 
@@ -12,12 +12,12 @@
 
 namespace
 {
-  class XMLDeclarationTest : public ::testing::Test
+  class XmlDeclarationTest : public ::testing::Test
   {
     protected:
 
-      XMLDeclarationTest() = default;
-      ~XMLDeclarationTest() override = default;
+      XmlDeclarationTest() = default;
+      ~XmlDeclarationTest() override = default;
 
       void SetUp() override
       {}
@@ -26,28 +26,28 @@ namespace
       {}
   };
 
-  TEST_F(XMLDeclarationTest, getEncoding)
+  TEST_F(XmlDeclarationTest, getEncoding)
   {
-    ls_std::XMLDeclaration declaration{"1.0"};
+    ls_std::XmlDeclaration declaration{"1.0"};
     ASSERT_TRUE(declaration.getEncoding().empty());
   }
 
-  TEST_F(XMLDeclarationTest, getStandalone)
+  TEST_F(XmlDeclarationTest, getStandalone)
   {
-    ls_std::XMLDeclaration declaration{"1.0"};
+    ls_std::XmlDeclaration declaration{"1.0"};
     ASSERT_TRUE(declaration.getStandalone().empty());
   }
 
-  TEST_F(XMLDeclarationTest, getVersion)
+  TEST_F(XmlDeclarationTest, getVersion)
   {
-    ls_std::XMLDeclaration declaration{"1.0"};
+    ls_std::XmlDeclaration declaration{"1.0"};
     ASSERT_FALSE(declaration.getVersion().empty());
     ASSERT_STREQ("1.0", declaration.getVersion().c_str());
   }
 
-  TEST_F(XMLDeclarationTest, setEncoding)
+  TEST_F(XmlDeclarationTest, setEncoding)
   {
-    ls_std::XMLDeclaration declaration{"1.0"};
+    ls_std::XmlDeclaration declaration{"1.0"};
 
     ASSERT_TRUE(declaration.getEncoding().empty());
 
@@ -55,9 +55,9 @@ namespace
     ASSERT_STREQ("iso-8859-1", declaration.getEncoding().c_str());
   }
 
-  TEST_F(XMLDeclarationTest, setStandalone)
+  TEST_F(XmlDeclarationTest, setStandalone)
   {
-    ls_std::XMLDeclaration declaration{"1.0"};
+    ls_std::XmlDeclaration declaration{"1.0"};
 
     ASSERT_TRUE(declaration.getStandalone().empty());
 
@@ -65,9 +65,9 @@ namespace
     ASSERT_STREQ("no", declaration.getStandalone().c_str());
   }
 
-  TEST_F(XMLDeclarationTest, setVersion)
+  TEST_F(XmlDeclarationTest, setVersion)
   {
-    ls_std::XMLDeclaration declaration{"1.0"};
+    ls_std::XmlDeclaration declaration{"1.0"};
 
     ASSERT_FALSE(declaration.getVersion().empty());
     ASSERT_STREQ("1.0", declaration.getVersion().c_str());
@@ -76,15 +76,15 @@ namespace
     ASSERT_STREQ("1.1", declaration.getVersion().c_str());
   }
 
-  TEST_F(XMLDeclarationTest, toXML)
+  TEST_F(XmlDeclarationTest, toXml)
   {
-    ls_std::XMLDeclaration declaration{"1.0"};
-    ASSERT_STREQ(R"(<?xml version="1.0" ?>)", declaration.toXML().c_str());
+    ls_std::XmlDeclaration declaration{"1.0"};
+    ASSERT_STREQ(R"(<?xml version="1.0" ?>)", declaration.toXml().c_str());
 
     declaration.setStandalone("yes");
-    ASSERT_STREQ(R"(<?xml version="1.0" standalone="yes" ?>)", declaration.toXML().c_str());
+    ASSERT_STREQ(R"(<?xml version="1.0" standalone="yes" ?>)", declaration.toXml().c_str());
 
     declaration.setEncoding("UTF-8");
-    ASSERT_STREQ(R"(<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>)", declaration.toXML().c_str());
+    ASSERT_STREQ(R"(<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>)", declaration.toXml().c_str());
   }
 }

+ 24 - 24
test/cases/io/xml/XMLDocumentTest.cpp → test/cases/io/xml/XmlDocumentTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-30
- * Changed:         2021-04-23
+ * Changed:         2021-05-02
  *
  * */
 
@@ -13,12 +13,12 @@
 
 namespace
 {
-  class XMLDocumentTest : public ::testing::Test
+  class XmlDocumentTest : public ::testing::Test
   {
     protected:
 
-      XMLDocumentTest() = default;
-      ~XMLDocumentTest() override = default;
+      XmlDocumentTest() = default;
+      ~XmlDocumentTest() override = default;
 
       void SetUp() override
       {}
@@ -27,55 +27,55 @@ namespace
       {}
   };
 
-  TEST_F(XMLDocumentTest, getDeclaration)
+  TEST_F(XmlDocumentTest, getDeclaration)
   {
-    ls_std::XMLDocument document{};
+    ls_std::XmlDocument document{};
     ASSERT_TRUE(document.getDeclaration() == nullptr);
   }
 
-  TEST_F(XMLDocumentTest, getRootElement)
+  TEST_F(XmlDocumentTest, getRootElement)
   {
-    ls_std::XMLDocument document{};
+    ls_std::XmlDocument document{};
     ASSERT_TRUE(document.getRootElement() == nullptr);
   }
 
-  TEST_F(XMLDocumentTest, setDeclaration)
+  TEST_F(XmlDocumentTest, setDeclaration)
   {
-    ls_std::XMLDocument document{};
+    ls_std::XmlDocument document{};
     ASSERT_TRUE(document.getDeclaration() == nullptr);
 
-    ls_std::XMLDeclaration declaration{"1.0"};
-    document.setDeclaration(std::make_shared<ls_std::XMLDeclaration>(declaration));
+    ls_std::XmlDeclaration declaration{"1.0"};
+    document.setDeclaration(std::make_shared<ls_std::XmlDeclaration>(declaration));
     ASSERT_TRUE(document.getDeclaration() != nullptr);
     ASSERT_STREQ("1.0", document.getDeclaration()->getVersion().c_str());
   }
 
-  TEST_F(XMLDocumentTest, setRootElement)
+  TEST_F(XmlDocumentTest, setRootElement)
   {
-    ls_std::XMLDocument document{};
+    ls_std::XmlDocument document{};
     ASSERT_TRUE(document.getRootElement() == nullptr);
 
-    ls_std::XMLDeclaration declaration{"1.0"};
-    document.setRootElement(ls_std_test::TestDataFactory::createXMLContent());
+    ls_std::XmlDeclaration declaration{"1.0"};
+    document.setRootElement(ls_std_test::TestDataFactory::createXmlContent());
     ASSERT_TRUE(document.getRootElement() != nullptr);
     ASSERT_STREQ("dialog", document.getRootElement()->getName().c_str());
   }
 
-  TEST_F(XMLDocumentTest, toXML)
+  TEST_F(XmlDocumentTest, toXml)
   {
-    ls_std::XMLDocument document{};
+    ls_std::XmlDocument document{};
 
-    ls_std::XMLDeclaration declaration{"1.0"};
+    ls_std::XmlDeclaration declaration{"1.0"};
     declaration.setEncoding("UTF-8");
     declaration.setStandalone("yes");
-    document.setDeclaration(std::make_shared<ls_std::XMLDeclaration>(declaration));
+    document.setDeclaration(std::make_shared<ls_std::XmlDeclaration>(declaration));
 
-    document.setRootElement(ls_std_test::TestDataFactory::createXMLContent());
-    std::string xmlStream = document.toXML();
+    document.setRootElement(ls_std_test::TestDataFactory::createXmlContent());
+    std::string xmlStream = document.toXml();
 
     ASSERT_TRUE(!xmlStream.empty());
 
-    std::string expectedXMLContent = R"(<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+    std::string expectedXmlString = R"(<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
 <dialog name="dungeon_001">
     <dialogUnit id="001">
         <text>Hello!</text>
@@ -86,6 +86,6 @@ namespace
 </dialog>
 )";
 
-    ASSERT_STREQ(expectedXMLContent.c_str(), xmlStream.c_str());
+    ASSERT_STREQ(expectedXmlString.c_str(), xmlStream.c_str());
   }
 }

+ 167 - 167
test/cases/io/xml/XMLNodeTest.cpp → test/cases/io/xml/XmlNodeTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-25
- * Changed:         2021-04-23
+ * Changed:         2021-05-02
  *
  * */
 
@@ -13,12 +13,12 @@
 
 namespace
 {
-  class XMLNodeTest : public ::testing::Test
+  class XmlNodeTest : public ::testing::Test
   {
     protected:
 
-      XMLNodeTest() = default;
-      ~XMLNodeTest() override = default;
+      XmlNodeTest() = default;
+      ~XmlNodeTest() override = default;
 
       void SetUp() override
       {}
@@ -27,12 +27,12 @@ namespace
       {}
   };
 
-  TEST_F(XMLNodeTest, addAttributeAfter)
+  TEST_F(XmlNodeTest, addAttributeAfter)
   {
-    ls_std::XMLNode dialogNode{"dialog"};
-    std::shared_ptr<ls_std::XMLAttribute> currentAttribute{};
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("events"));
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("assets"));
+    ls_std::XmlNode dialogNode{"dialog"};
+    std::shared_ptr<ls_std::XmlAttribute> currentAttribute{};
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("events"));
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("assets"));
 
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 0);
     ASSERT_STREQ("events", currentAttribute->getName().c_str());
@@ -41,7 +41,7 @@ namespace
 
     // add id after events
 
-    ASSERT_TRUE(dialogNode.addAttributeAfter(std::make_shared<ls_std::XMLAttribute>("id"), "events"));
+    ASSERT_TRUE(dialogNode.addAttributeAfter(std::make_shared<ls_std::XmlAttribute>("id"), "events"));
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 0);
     ASSERT_STREQ("events", currentAttribute->getName().c_str());
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 1);
@@ -51,7 +51,7 @@ namespace
 
     // add tasks after assets
 
-    ASSERT_TRUE(dialogNode.addAttributeAfter(std::make_shared<ls_std::XMLAttribute>("tasks"), "assets"));
+    ASSERT_TRUE(dialogNode.addAttributeAfter(std::make_shared<ls_std::XmlAttribute>("tasks"), "assets"));
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 0);
     ASSERT_STREQ("events", currentAttribute->getName().c_str());
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 1);
@@ -62,20 +62,20 @@ namespace
     ASSERT_STREQ("tasks", currentAttribute->getName().c_str());
   }
 
-  TEST_F(XMLNodeTest, addAttributeAfterNegative)
+  TEST_F(XmlNodeTest, addAttributeAfterNegative)
   {
-    ls_std::XMLNode dialogNode{"dialog"};
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("events"));
+    ls_std::XmlNode dialogNode{"dialog"};
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("events"));
 
-    ASSERT_FALSE(dialogNode.addAttributeAfter(std::make_shared<ls_std::XMLAttribute>("id"), "assets"));
+    ASSERT_FALSE(dialogNode.addAttributeAfter(std::make_shared<ls_std::XmlAttribute>("id"), "assets"));
   }
 
-  TEST_F(XMLNodeTest, addAttributeBefore)
+  TEST_F(XmlNodeTest, addAttributeBefore)
   {
-    ls_std::XMLNode dialogNode{"dialog"};
-    std::shared_ptr<ls_std::XMLAttribute> currentAttribute{};
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("events"));
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("assets"));
+    ls_std::XmlNode dialogNode{"dialog"};
+    std::shared_ptr<ls_std::XmlAttribute> currentAttribute{};
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("events"));
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("assets"));
 
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 0);
     ASSERT_STREQ("events", currentAttribute->getName().c_str());
@@ -84,7 +84,7 @@ namespace
 
     // add id before events
 
-    ASSERT_TRUE(dialogNode.addAttributeBefore(std::make_shared<ls_std::XMLAttribute>("id"), "events"));
+    ASSERT_TRUE(dialogNode.addAttributeBefore(std::make_shared<ls_std::XmlAttribute>("id"), "events"));
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 0);
     ASSERT_STREQ("id", currentAttribute->getName().c_str());
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 1);
@@ -94,7 +94,7 @@ namespace
 
     // add tasks before assets
 
-    ASSERT_TRUE(dialogNode.addAttributeBefore(std::make_shared<ls_std::XMLAttribute>("tasks"), "assets"));
+    ASSERT_TRUE(dialogNode.addAttributeBefore(std::make_shared<ls_std::XmlAttribute>("tasks"), "assets"));
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 0);
     ASSERT_STREQ("id", currentAttribute->getName().c_str());
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 1);
@@ -105,32 +105,32 @@ namespace
     ASSERT_STREQ("assets", currentAttribute->getName().c_str());
   }
 
-  TEST_F(XMLNodeTest, addAttributeBeforeNegative)
+  TEST_F(XmlNodeTest, addAttributeBeforeNegative)
   {
-    ls_std::XMLNode dialogNode{"dialog"};
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("events"));
+    ls_std::XmlNode dialogNode{"dialog"};
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("events"));
 
-    ASSERT_FALSE(dialogNode.addAttributeBefore(std::make_shared<ls_std::XMLAttribute>("id"), "assets"));
+    ASSERT_FALSE(dialogNode.addAttributeBefore(std::make_shared<ls_std::XmlAttribute>("id"), "assets"));
   }
 
-  TEST_F(XMLNodeTest, addAttributeToBeginning)
+  TEST_F(XmlNodeTest, addAttributeToBeginning)
   {
-    ls_std::XMLNode dialogNode{"dialog"};
-    std::shared_ptr<ls_std::XMLAttribute> currentAttribute{};
+    ls_std::XmlNode dialogNode{"dialog"};
+    std::shared_ptr<ls_std::XmlAttribute> currentAttribute{};
 
-    dialogNode.addAttributeToBeginning(std::make_shared<ls_std::XMLAttribute>("id"));
+    dialogNode.addAttributeToBeginning(std::make_shared<ls_std::XmlAttribute>("id"));
     ASSERT_EQ(1, dialogNode.getAttributes().size());
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 0);
     ASSERT_STREQ("id", currentAttribute->getName().c_str());
 
-    dialogNode.addAttributeToBeginning(std::make_shared<ls_std::XMLAttribute>("assets"));
+    dialogNode.addAttributeToBeginning(std::make_shared<ls_std::XmlAttribute>("assets"));
     ASSERT_EQ(2, dialogNode.getAttributes().size());
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 0);
     ASSERT_STREQ("assets", currentAttribute->getName().c_str());
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 1);
     ASSERT_STREQ("id", currentAttribute->getName().c_str());
 
-    dialogNode.addAttributeToBeginning(std::make_shared<ls_std::XMLAttribute>("events"));
+    dialogNode.addAttributeToBeginning(std::make_shared<ls_std::XmlAttribute>("events"));
     ASSERT_EQ(3, dialogNode.getAttributes().size());
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 0);
     ASSERT_STREQ("events", currentAttribute->getName().c_str());
@@ -140,24 +140,24 @@ namespace
     ASSERT_STREQ("id", currentAttribute->getName().c_str());
   }
 
-  TEST_F(XMLNodeTest, addAttributeToEnd)
+  TEST_F(XmlNodeTest, addAttributeToEnd)
   {
-    ls_std::XMLNode dialogNode{"dialog"};
-    std::shared_ptr<ls_std::XMLAttribute> currentAttribute{};
+    ls_std::XmlNode dialogNode{"dialog"};
+    std::shared_ptr<ls_std::XmlAttribute> currentAttribute{};
 
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("id"));
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("id"));
     ASSERT_EQ(1, dialogNode.getAttributes().size());
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 0);
     ASSERT_STREQ("id", currentAttribute->getName().c_str());
 
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("assets"));
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("assets"));
     ASSERT_EQ(2, dialogNode.getAttributes().size());
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 0);
     ASSERT_STREQ("id", currentAttribute->getName().c_str());
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 1);
     ASSERT_STREQ("assets", currentAttribute->getName().c_str());
 
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("events"));
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("events"));
     ASSERT_EQ(3, dialogNode.getAttributes().size());
     currentAttribute = *std::next(dialogNode.getAttributes().begin(), 0);
     ASSERT_STREQ("id", currentAttribute->getName().c_str());
@@ -167,14 +167,14 @@ namespace
     ASSERT_STREQ("events", currentAttribute->getName().c_str());
   }
 
-  TEST_F(XMLNodeTest, addChildAfter)
+  TEST_F(XmlNodeTest, addChildAfter)
   {
-    ls_std::XMLNode dialogsNode{"dialogs"};
-    std::shared_ptr<ls_std::XMLNode> currentNode{};
-    std::shared_ptr<ls_std::XMLNode> dialogNodeA = std::make_shared<ls_std::XMLNode>("dialogNodeA");
-    std::shared_ptr<ls_std::XMLNode> dialogNodeB = std::make_shared<ls_std::XMLNode>("dialogNodeB");
-    std::shared_ptr<ls_std::XMLNode> dialogNodeC = std::make_shared<ls_std::XMLNode>("dialogNodeC");
-    std::shared_ptr<ls_std::XMLNode> dialogNodeD = std::make_shared<ls_std::XMLNode>("dialogNodeD");
+    ls_std::XmlNode dialogsNode{"dialogs"};
+    std::shared_ptr<ls_std::XmlNode> currentNode{};
+    std::shared_ptr<ls_std::XmlNode> dialogNodeA = std::make_shared<ls_std::XmlNode>("dialogNodeA");
+    std::shared_ptr<ls_std::XmlNode> dialogNodeB = std::make_shared<ls_std::XmlNode>("dialogNodeB");
+    std::shared_ptr<ls_std::XmlNode> dialogNodeC = std::make_shared<ls_std::XmlNode>("dialogNodeC");
+    std::shared_ptr<ls_std::XmlNode> dialogNodeD = std::make_shared<ls_std::XmlNode>("dialogNodeD");
 
     ASSERT_TRUE(dialogsNode.addChildToEnd(dialogNodeB));
     ASSERT_TRUE(dialogsNode.addChildToEnd(dialogNodeC));
@@ -209,23 +209,23 @@ namespace
     ASSERT_STREQ("dialogNodeD", currentNode->getName().c_str());
   }
 
-  TEST_F(XMLNodeTest, addChildAfterNegative)
+  TEST_F(XmlNodeTest, addChildAfterNegative)
   {
-    ls_std::XMLNode dialogsNode{"dialogs"};
-    std::shared_ptr<ls_std::XMLNode> dialogNodeA = std::make_shared<ls_std::XMLNode>("dialogNodeA");
-    std::shared_ptr<ls_std::XMLNode> dialogNodeB = std::make_shared<ls_std::XMLNode>("dialogNodeB");
+    ls_std::XmlNode dialogsNode{"dialogs"};
+    std::shared_ptr<ls_std::XmlNode> dialogNodeA = std::make_shared<ls_std::XmlNode>("dialogNodeA");
+    std::shared_ptr<ls_std::XmlNode> dialogNodeB = std::make_shared<ls_std::XmlNode>("dialogNodeB");
 
     ASSERT_FALSE(dialogsNode.addChildAfter(dialogNodeA, dialogNodeB));
   }
 
-  TEST_F(XMLNodeTest, addChildBefore)
+  TEST_F(XmlNodeTest, addChildBefore)
   {
-    ls_std::XMLNode dialogsNode{"dialogs"};
-    std::shared_ptr<ls_std::XMLNode> currentNode{};
-    std::shared_ptr<ls_std::XMLNode> dialogNodeA = std::make_shared<ls_std::XMLNode>("dialogNodeA");
-    std::shared_ptr<ls_std::XMLNode> dialogNodeB = std::make_shared<ls_std::XMLNode>("dialogNodeB");
-    std::shared_ptr<ls_std::XMLNode> dialogNodeC = std::make_shared<ls_std::XMLNode>("dialogNodeC");
-    std::shared_ptr<ls_std::XMLNode> dialogNodeD = std::make_shared<ls_std::XMLNode>("dialogNodeD");
+    ls_std::XmlNode dialogsNode{"dialogs"};
+    std::shared_ptr<ls_std::XmlNode> currentNode{};
+    std::shared_ptr<ls_std::XmlNode> dialogNodeA = std::make_shared<ls_std::XmlNode>("dialogNodeA");
+    std::shared_ptr<ls_std::XmlNode> dialogNodeB = std::make_shared<ls_std::XmlNode>("dialogNodeB");
+    std::shared_ptr<ls_std::XmlNode> dialogNodeC = std::make_shared<ls_std::XmlNode>("dialogNodeC");
+    std::shared_ptr<ls_std::XmlNode> dialogNodeD = std::make_shared<ls_std::XmlNode>("dialogNodeD");
 
     ASSERT_TRUE(dialogsNode.addChildToEnd(dialogNodeB));
     ASSERT_TRUE(dialogsNode.addChildToEnd(dialogNodeC));
@@ -260,21 +260,21 @@ namespace
     ASSERT_STREQ("dialogNodeC", currentNode->getName().c_str());
   }
 
-  TEST_F(XMLNodeTest, addChildToBeginning)
+  TEST_F(XmlNodeTest, addChildToBeginning)
   {
-    ls_std::XMLNode dialogsNode{"dialogs"};
-    std::shared_ptr<ls_std::XMLNode> currentNode{};
+    ls_std::XmlNode dialogsNode{"dialogs"};
+    std::shared_ptr<ls_std::XmlNode> currentNode{};
 
-    ls_std::XMLNode dialogNodeA{"dialogNodeA"};
-    ls_std::XMLNode dialogNodeB{"dialogNodeB"};
-    ls_std::XMLNode dialogNodeC{"dialogNodeC"};
+    ls_std::XmlNode dialogNodeA{"dialogNodeA"};
+    ls_std::XmlNode dialogNodeB{"dialogNodeB"};
+    ls_std::XmlNode dialogNodeC{"dialogNodeC"};
 
     ASSERT_TRUE(dialogsNode.getChildren().empty());
     ASSERT_EQ(0, dialogsNode.getChildren().size());
 
     // adding C
 
-    ASSERT_TRUE(dialogsNode.addChildToBeginning(std::make_shared<ls_std::XMLNode>(dialogNodeC)));
+    ASSERT_TRUE(dialogsNode.addChildToBeginning(std::make_shared<ls_std::XmlNode>(dialogNodeC)));
     ASSERT_TRUE(!dialogsNode.getChildren().empty());
     ASSERT_EQ(1, dialogsNode.getChildren().size());
 
@@ -283,7 +283,7 @@ namespace
 
     // adding B
 
-    ASSERT_TRUE(dialogsNode.addChildToBeginning(std::make_shared<ls_std::XMLNode>(dialogNodeB)));
+    ASSERT_TRUE(dialogsNode.addChildToBeginning(std::make_shared<ls_std::XmlNode>(dialogNodeB)));
     ASSERT_EQ(2, dialogsNode.getChildren().size());
     currentNode = *std::next(dialogsNode.getChildren().begin(), 0);
     ASSERT_STREQ("dialogNodeB", currentNode->getName().c_str());
@@ -292,7 +292,7 @@ namespace
 
     // adding A
 
-    ASSERT_TRUE(dialogsNode.addChildToBeginning(std::make_shared<ls_std::XMLNode>(dialogNodeA)));
+    ASSERT_TRUE(dialogsNode.addChildToBeginning(std::make_shared<ls_std::XmlNode>(dialogNodeA)));
     ASSERT_EQ(3, dialogsNode.getChildren().size());
     currentNode = *std::next(dialogsNode.getChildren().begin(), 0);
     ASSERT_STREQ("dialogNodeA", currentNode->getName().c_str());
@@ -302,21 +302,21 @@ namespace
     ASSERT_STREQ("dialogNodeC", currentNode->getName().c_str());
   }
 
-  TEST_F(XMLNodeTest, addChildToEnd)
+  TEST_F(XmlNodeTest, addChildToEnd)
   {
-    ls_std::XMLNode dialogsNode{"dialogs"};
-    std::shared_ptr<ls_std::XMLNode> currentNode{};
+    ls_std::XmlNode dialogsNode{"dialogs"};
+    std::shared_ptr<ls_std::XmlNode> currentNode{};
 
-    ls_std::XMLNode dialogNodeA{"dialogNodeA"};
-    ls_std::XMLNode dialogNodeB{"dialogNodeB"};
-    ls_std::XMLNode dialogNodeC{"dialogNodeC"};
+    ls_std::XmlNode dialogNodeA{"dialogNodeA"};
+    ls_std::XmlNode dialogNodeB{"dialogNodeB"};
+    ls_std::XmlNode dialogNodeC{"dialogNodeC"};
 
     ASSERT_TRUE(dialogsNode.getChildren().empty());
     ASSERT_EQ(0, dialogsNode.getChildren().size());
 
     // adding C
 
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>(dialogNodeC)));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>(dialogNodeC)));
     ASSERT_TRUE(!dialogsNode.getChildren().empty());
     ASSERT_EQ(1, dialogsNode.getChildren().size());
 
@@ -325,7 +325,7 @@ namespace
 
     // adding B
 
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>(dialogNodeB)));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>(dialogNodeB)));
     ASSERT_EQ(2, dialogsNode.getChildren().size());
     currentNode = *std::next(dialogsNode.getChildren().begin(), 0);
     ASSERT_STREQ("dialogNodeC", currentNode->getName().c_str());
@@ -334,7 +334,7 @@ namespace
 
     // adding A
 
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>(dialogNodeA)));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>(dialogNodeA)));
     ASSERT_EQ(3, dialogsNode.getChildren().size());
     currentNode = *std::next(dialogsNode.getChildren().begin(), 0);
     ASSERT_STREQ("dialogNodeC", currentNode->getName().c_str());
@@ -344,9 +344,9 @@ namespace
     ASSERT_STREQ("dialogNodeA", currentNode->getName().c_str());
   }
 
-  TEST_F(XMLNodeTest, clearValue)
+  TEST_F(XmlNodeTest, clearValue)
   {
-    ls_std::XMLNode dialogNode{"dialog"};
+    ls_std::XmlNode dialogNode{"dialog"};
     dialogNode.setValue("Something");
     ASSERT_STREQ("Something", dialogNode.getValue().c_str());
 
@@ -355,31 +355,31 @@ namespace
     ASSERT_STREQ("", dialogNode.getValue().c_str());
   }
 
-  TEST_F(XMLNodeTest, getAttributes)
+  TEST_F(XmlNodeTest, getAttributes)
   {
-    ls_std::XMLNode dialogNode{"dialog"};
+    ls_std::XmlNode dialogNode{"dialog"};
     ASSERT_TRUE(dialogNode.getAttributes().empty());
   }
 
-  TEST_F(XMLNodeTest, getChildren)
+  TEST_F(XmlNodeTest, getChildren)
   {
-    ls_std::XMLNode dialogNode{"dialog"};
+    ls_std::XmlNode dialogNode{"dialog"};
     ASSERT_TRUE(dialogNode.getChildren().empty());
   }
 
-  TEST_F(XMLNodeTest, getChildrenV2)
+  TEST_F(XmlNodeTest, getChildrenV2)
   {
-    ls_std::XMLNode dialogsNode{"dialogs"};
-    ls_std::XMLNode dialogNode{"dialog"};
-    ls_std::XMLNode otherNode{"something"};
+    ls_std::XmlNode dialogsNode{"dialogs"};
+    ls_std::XmlNode dialogNode{"dialog"};
+    ls_std::XmlNode otherNode{"something"};
 
     // preparation
 
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>(dialogNode)));
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>(otherNode)));
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>(otherNode)));
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>(dialogNode)));
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>(otherNode)));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>(dialogNode)));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>(otherNode)));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>(otherNode)));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>(dialogNode)));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>(otherNode)));
 
     // check
 
@@ -389,92 +389,92 @@ namespace
     ASSERT_EQ(3, dialogsNode.getChildren("something").size());
   }
 
-  TEST_F(XMLNodeTest, getName)
+  TEST_F(XmlNodeTest, getName)
   {
-    ls_std::XMLNode dialogNode{"dialog"};
+    ls_std::XmlNode dialogNode{"dialog"};
     ASSERT_STREQ("dialog", dialogNode.getName().c_str());
   }
 
-  TEST_F(XMLNodeTest, getValue)
+  TEST_F(XmlNodeTest, getValue)
   {
-    ls_std::XMLNode dialogNode{"dialog"};
+    ls_std::XmlNode dialogNode{"dialog"};
     ASSERT_TRUE(dialogNode.getValue().empty());
   }
 
-  TEST_F(XMLNodeTest, hasAttribute)
+  TEST_F(XmlNodeTest, hasAttribute)
   {
-    ls_std::XMLNode dialogNode{"dialogNode"};
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("id"));
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("events"));
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("assets"));
+    ls_std::XmlNode dialogNode{"dialogNode"};
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("id"));
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("events"));
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("assets"));
 
     ASSERT_TRUE(dialogNode.hasAttribute("id"));
     ASSERT_TRUE(dialogNode.hasAttribute("events"));
     ASSERT_TRUE(dialogNode.hasAttribute("assets"));
   }
 
-  TEST_F(XMLNodeTest, hasAttributeNegative)
+  TEST_F(XmlNodeTest, hasAttributeNegative)
   {
-    ls_std::XMLNode dialogNode{"dialogNode"};
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("id"));
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("events"));
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("assets"));
+    ls_std::XmlNode dialogNode{"dialogNode"};
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("id"));
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("events"));
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("assets"));
 
     ASSERT_FALSE(dialogNode.hasAttribute("fields"));
   }
 
-  TEST_F(XMLNodeTest, hasChild)
+  TEST_F(XmlNodeTest, hasChild)
   {
-    ls_std::XMLNode dialogsNode{"dialogsNode"};
-    dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("dialogA"));
-    dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("dialogB"));
-    dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("dialogC"));
+    ls_std::XmlNode dialogsNode{"dialogsNode"};
+    dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("dialogA"));
+    dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("dialogB"));
+    dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("dialogC"));
 
     ASSERT_TRUE(dialogsNode.hasChild("dialogA"));
     ASSERT_TRUE(dialogsNode.hasChild("dialogB"));
     ASSERT_TRUE(dialogsNode.hasChild("dialogC"));
   }
 
-  TEST_F(XMLNodeTest, hasChildNegative)
+  TEST_F(XmlNodeTest, hasChildNegative)
   {
-    ls_std::XMLNode dialogsNode{"dialogsNode"};
-    dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("dialogA"));
-    dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("dialogB"));
-    dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("dialogC"));
+    ls_std::XmlNode dialogsNode{"dialogsNode"};
+    dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("dialogA"));
+    dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("dialogB"));
+    dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("dialogC"));
 
     ASSERT_FALSE(dialogsNode.hasChild("dialogD"));
     ASSERT_FALSE(dialogsNode.hasChild("dialogE"));
     ASSERT_FALSE(dialogsNode.hasChild("dialogF"));
   }
 
-  TEST_F(XMLNodeTest, hasChildV2)
+  TEST_F(XmlNodeTest, hasChildV2)
   {
-    ls_std::XMLNode dialogsNode{"dialogsNode"};
-    std::shared_ptr<ls_std::XMLNode> searchNode = std::make_shared<ls_std::XMLNode>("dialogB");
-    dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("dialogA"));
+    ls_std::XmlNode dialogsNode{"dialogsNode"};
+    std::shared_ptr<ls_std::XmlNode> searchNode = std::make_shared<ls_std::XmlNode>("dialogB");
+    dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("dialogA"));
     dialogsNode.addChildToEnd(searchNode);
-    dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("dialogC"));
+    dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("dialogC"));
 
     ASSERT_TRUE(dialogsNode.hasChild(searchNode));
   }
 
-  TEST_F(XMLNodeTest, hasChildV2Negative)
+  TEST_F(XmlNodeTest, hasChildV2Negative)
   {
-    ls_std::XMLNode dialogsNode{"dialogsNode"};
-    std::shared_ptr<ls_std::XMLNode> searchNode = std::make_shared<ls_std::XMLNode>("dialogB");
-    dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("dialogA"));
-    dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("dialogC"));
+    ls_std::XmlNode dialogsNode{"dialogsNode"};
+    std::shared_ptr<ls_std::XmlNode> searchNode = std::make_shared<ls_std::XmlNode>("dialogB");
+    dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("dialogA"));
+    dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("dialogC"));
 
     ASSERT_FALSE(dialogsNode.hasChild(searchNode));
   }
 
-  TEST_F(XMLNodeTest, removeFirstAttribute)
+  TEST_F(XmlNodeTest, removeFirstAttribute)
   {
-    ls_std::XMLNode dialogNode{"dialog"};
-    std::shared_ptr<ls_std::XMLAttribute> currentAttribute{};
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("id"));
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("events"));
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("assets"));
+    ls_std::XmlNode dialogNode{"dialog"};
+    std::shared_ptr<ls_std::XmlAttribute> currentAttribute{};
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("id"));
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("events"));
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("assets"));
 
     ASSERT_TRUE(!dialogNode.getAttributes().empty());
     ASSERT_EQ(3, dialogNode.getAttributes().size());
@@ -488,22 +488,22 @@ namespace
     ASSERT_STREQ("assets", currentAttribute->getName().c_str());
   }
 
-  TEST_F(XMLNodeTest, removeFirstAttributeNegative)
+  TEST_F(XmlNodeTest, removeFirstAttributeNegative)
   {
-    ls_std::XMLNode dialogNode{"dialog"};
+    ls_std::XmlNode dialogNode{"dialog"};
     ASSERT_TRUE(dialogNode.getAttributes().empty());
 
     dialogNode.removeFirstAttribute();
     ASSERT_TRUE(dialogNode.getAttributes().empty());
   }
 
-  TEST_F(XMLNodeTest, removeLastAttribute)
+  TEST_F(XmlNodeTest, removeLastAttribute)
   {
-    ls_std::XMLNode dialogNode{"dialog"};
-    std::shared_ptr<ls_std::XMLAttribute> currentAttribute{};
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("id"));
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("events"));
-    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XMLAttribute>("assets"));
+    ls_std::XmlNode dialogNode{"dialog"};
+    std::shared_ptr<ls_std::XmlAttribute> currentAttribute{};
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("id"));
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("events"));
+    dialogNode.addAttributeToEnd(std::make_shared<ls_std::XmlAttribute>("assets"));
 
     ASSERT_TRUE(!dialogNode.getAttributes().empty());
     ASSERT_EQ(3, dialogNode.getAttributes().size());
@@ -517,27 +517,27 @@ namespace
     ASSERT_STREQ("events", currentAttribute->getName().c_str());
   }
 
-  TEST_F(XMLNodeTest, removeLastAttributeNegative)
+  TEST_F(XmlNodeTest, removeLastAttributeNegative)
   {
-    ls_std::XMLNode dialogNode{"dialog"};
+    ls_std::XmlNode dialogNode{"dialog"};
     ASSERT_TRUE(dialogNode.getAttributes().empty());
 
     dialogNode.removeLastAttribute();
     ASSERT_TRUE(dialogNode.getAttributes().empty());
   }
 
-  TEST_F(XMLNodeTest, removeFirstChild)
+  TEST_F(XmlNodeTest, removeFirstChild)
   {
-    ls_std::XMLNode dialogsNode{"dialogs"};
-    std::shared_ptr<ls_std::XMLNode> currentNode{};
+    ls_std::XmlNode dialogsNode{"dialogs"};
+    std::shared_ptr<ls_std::XmlNode> currentNode{};
 
     // preparation
 
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("dialogA")));
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("dialogB")));
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("dialogC")));
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("additionalInfo")));
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("event")));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("dialogA")));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("dialogB")));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("dialogC")));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("additionalInfo")));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("event")));
 
     ASSERT_EQ(5, dialogsNode.getChildren().size());
     currentNode = *std::next(dialogsNode.getChildren().begin(), 0);
@@ -564,27 +564,27 @@ namespace
     ASSERT_STREQ("event", currentNode->getName().c_str());
   }
 
-  TEST_F(XMLNodeTest, removeFirstChildNegative)
+  TEST_F(XmlNodeTest, removeFirstChildNegative)
   {
-    ls_std::XMLNode dialogsNode{"dialogs"};
+    ls_std::XmlNode dialogsNode{"dialogs"};
     ASSERT_TRUE(dialogsNode.getChildren().empty());
 
     dialogsNode.removeFirstChild();
     ASSERT_TRUE(dialogsNode.getChildren().empty());
   }
 
-  TEST_F(XMLNodeTest, removeLastChild)
+  TEST_F(XmlNodeTest, removeLastChild)
   {
-    ls_std::XMLNode dialogsNode{"dialogs"};
-    std::shared_ptr<ls_std::XMLNode> currentNode{};
+    ls_std::XmlNode dialogsNode{"dialogs"};
+    std::shared_ptr<ls_std::XmlNode> currentNode{};
 
     // preparation
 
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("dialogA")));
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("dialogB")));
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("dialogC")));
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("additionalInfo")));
-    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XMLNode>("event")));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("dialogA")));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("dialogB")));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("dialogC")));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("additionalInfo")));
+    ASSERT_TRUE(dialogsNode.addChildToEnd(std::make_shared<ls_std::XmlNode>("event")));
 
     ASSERT_EQ(5, dialogsNode.getChildren().size());
     currentNode = *std::next(dialogsNode.getChildren().begin(), 0);
@@ -611,36 +611,36 @@ namespace
     ASSERT_STREQ("additionalInfo", currentNode->getName().c_str());
   }
 
-  TEST_F(XMLNodeTest, removeLastChildNegative)
+  TEST_F(XmlNodeTest, removeLastChildNegative)
   {
-    ls_std::XMLNode dialogsNode{"dialogs"};
+    ls_std::XmlNode dialogsNode{"dialogs"};
     ASSERT_TRUE(dialogsNode.getChildren().empty());
 
     dialogsNode.removeLastChild();
     ASSERT_TRUE(dialogsNode.getChildren().empty());
   }
 
-  TEST_F(XMLNodeTest, setName)
+  TEST_F(XmlNodeTest, setName)
   {
-    ls_std::XMLNode dialogNode{"dialog"};
+    ls_std::XmlNode dialogNode{"dialog"};
     dialogNode.setName("dialog2");
 
     ASSERT_STREQ("dialog2", dialogNode.getName().c_str());
   }
 
-  TEST_F(XMLNodeTest, setValue)
+  TEST_F(XmlNodeTest, setValue)
   {
-    ls_std::XMLNode dialogNode{"dialog"};
+    ls_std::XmlNode dialogNode{"dialog"};
     dialogNode.setValue("Something written");
 
     ASSERT_STREQ("Something written", dialogNode.getValue().c_str());
   }
 
-  TEST_F(XMLNodeTest, toXML)
+  TEST_F(XmlNodeTest, toXml)
   {
-    auto root = ls_std_test::TestDataFactory::createXMLContent();
-    std::string xmlContent = root->toXML();
-    std::string expectedXMLContent = R"("<dialog name="dungeon_001"><dialogUnit id="001"><text>Hello!</text></dialogUnit><dialogUnit id="002"><text>Hello again!</text></dialogUnit></dialog>")";
+    auto root = ls_std_test::TestDataFactory::createXmlContent();
+    std::string xmlContent = root->toXml();
+    std::string expectedXmlString = R"("<dialog name="dungeon_001"><dialogUnit id="001"><text>Hello!</text></dialogUnit><dialogUnit id="002"><text>Hello again!</text></dialogUnit></dialog>")";
 
     ASSERT_TRUE(!xmlContent.empty());
   }

+ 11 - 11
test/cases/io/xml/XMLParserMockTest.cpp → test/cases/io/xml/XmlParserMockTest.cpp

@@ -3,21 +3,21 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-18
- * Changed:         2021-04-23
+ * Changed:         2021-05-02
  *
  * */
 
 #include <gtest/gtest.h>
-#include <ls_std/io/xml/XMLParserMock.hpp>
+#include <ls_std/io/xml/XmlParserMock.hpp>
 
 namespace
 {
-  class XMLParserMockTest : public ::testing::Test
+  class XmlParserMockTest : public ::testing::Test
   {
     protected:
 
-      XMLParserMockTest() = default;
-      ~XMLParserMockTest() override = default;
+      XmlParserMockTest() = default;
+      ~XmlParserMockTest() override = default;
 
       void SetUp() override
       {}
@@ -26,23 +26,23 @@ namespace
       {}
   };
 
-  TEST_F(XMLParserMockTest, readAttribute)
+  TEST_F(XmlParserMockTest, readAttribute)
   {
-    std::pair<std::string, std::string> attribute = ls_std::XMLParserMock::readAttribute(R"(name="tim")");
+    std::pair<std::string, std::string> attribute = ls_std::XmlParserMock::readAttribute(R"(name="tim")");
     ASSERT_TRUE(attribute.first == "name");
     ASSERT_TRUE(attribute.second == "tim");
 
-    attribute = ls_std::XMLParserMock::readAttribute(R"(id="dialog_001")");
+    attribute = ls_std::XmlParserMock::readAttribute(R"(id="dialog_001")");
     ASSERT_TRUE(attribute.first == "id");
     ASSERT_TRUE(attribute.second == "dialog_001");
   }
 
-  TEST_F(XMLParserMockTest, readAttributes)
+  TEST_F(XmlParserMockTest, readAttributes)
   {
     // first case
 
     std::string tag = R"(<?xml version="1.0" encoding="UTF-8" ?>)";
-    std::list<std::pair<std::string, std::string>> attributes = ls_std::XMLParserMock::readAttributes(tag);
+    std::list<std::pair<std::string, std::string>> attributes = ls_std::XmlParserMock::readAttributes(tag);
 
     ASSERT_EQ(2, attributes.size());
 
@@ -57,7 +57,7 @@ namespace
     // second case
 
     tag = R"(<stateMachine name="test_machine">)";
-    attributes = ls_std::XMLParserMock::readAttributes(tag);
+    attributes = ls_std::XmlParserMock::readAttributes(tag);
 
     ASSERT_EQ(1, attributes.size());
 

+ 17 - 17
test/cases/io/xml/XMLParserTest.cpp → test/cases/io/xml/XmlParserTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-26
- * Changed:         2021-04-23
+ * Changed:         2021-05-02
  *
  * */
 
@@ -13,14 +13,14 @@
 
 namespace
 {
-  class XMLParserTest : public ::testing::Test
+  class XmlParserTest : public ::testing::Test
   {
     protected:
 
-      XMLParserTest() = default;
-      ~XMLParserTest() override = default;
+      XmlParserTest() = default;
+      ~XmlParserTest() override = default;
 
-      static ls_std::byte_field readXMLStateMachine()
+      static ls_std::byte_field readXmlStateMachine()
       {
         std::string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
         ls_std::File file{xmlPath};
@@ -36,13 +36,13 @@ namespace
       {}
   };
 
-  TEST_F(XMLParserTest, read)
+  TEST_F(XmlParserTest, read)
   {
-    ls_std::XMLParser xmlParser{std::make_shared<ls_std::XMLDocument>()};
-    std::list<std::shared_ptr<ls_std::XMLNode>> children, statesChildren, memoryChildren, connectionChildren{};
-    std::list<std::shared_ptr<ls_std::XMLAttribute>> attributes{};
+    ls_std::XmlParser xmlParser{std::make_shared<ls_std::XmlDocument>()};
+    std::list<std::shared_ptr<ls_std::XmlNode>> children, statesChildren, memoryChildren, connectionChildren{};
+    std::list<std::shared_ptr<ls_std::XmlAttribute>> attributes{};
 
-    ls_std::byte_field data = readXMLStateMachine();
+    ls_std::byte_field data = readXmlStateMachine();
     xmlParser.parse(data);
 
     // check declaration
@@ -53,7 +53,7 @@ namespace
 
     // check root element
 
-    std::shared_ptr<ls_std::XMLNode> root = xmlParser.getDocument()->getRootElement();
+    std::shared_ptr<ls_std::XmlNode> root = xmlParser.getDocument()->getRootElement();
     ASSERT_STREQ("stateMachine", root->getName().c_str());
     ASSERT_STREQ("name", root->getAttributes().front()->getName().c_str());
     ASSERT_EQ(1, root->getAttributes().size());
@@ -203,22 +203,22 @@ namespace
     ASSERT_TRUE(ls_std::STLUtils::getListElementAt(memoryChildren, 2)->getAttributes().empty());
   }
 
-  TEST_F(XMLParserTest, getDocument)
+  TEST_F(XmlParserTest, getDocument)
   {
     std::string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
-    ls_std::XMLParser xmlParser{std::make_shared<ls_std::XMLDocument>()};
+    ls_std::XmlParser xmlParser{std::make_shared<ls_std::XmlDocument>()};
 
     ASSERT_TRUE(xmlParser.getDocument() != nullptr);
   }
 
-  TEST_F(XMLParserTest, setDocument)
+  TEST_F(XmlParserTest, setDocument)
   {
     std::string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
-    std::shared_ptr<ls_std::XMLDocument> document = std::make_shared<ls_std::XMLDocument>();
-    ls_std::XMLParser xmlParser{document};
+    std::shared_ptr<ls_std::XmlDocument> document = std::make_shared<ls_std::XmlDocument>();
+    ls_std::XmlParser xmlParser{document};
     ASSERT_TRUE(xmlParser.getDocument() == document);
 
-    document = std::make_shared<ls_std::XMLDocument>();
+    document = std::make_shared<ls_std::XmlDocument>();
     xmlParser.setDocument(document);
     ASSERT_TRUE(xmlParser.getDocument() == document);
   }

+ 17 - 17
test/cases/io/xml/XMLReaderTest.cpp → test/cases/io/xml/XmlReaderTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-10
- * Changed:         2021-04-23
+ * Changed:         2021-05-02
  *
  * */
 
@@ -13,12 +13,12 @@
 
 namespace
 {
-  class XMLReaderTest : public ::testing::Test
+  class XmlReaderTest : public ::testing::Test
   {
     protected:
 
-      XMLReaderTest() = default;
-      ~XMLReaderTest() override = default;
+      XmlReaderTest() = default;
+      ~XmlReaderTest() override = default;
 
       void SetUp() override
       {}
@@ -27,12 +27,12 @@ namespace
       {}
   };
 
-  TEST_F(XMLReaderTest, read)
+  TEST_F(XmlReaderTest, read)
   {
     std::string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
-    ls_std::XMLReader xmlReader{std::make_shared<ls_std::XMLDocument>(), xmlPath};
-    std::list<std::shared_ptr<ls_std::XMLNode>> children, statesChildren, memoryChildren, connectionChildren{};
-    std::list<std::shared_ptr<ls_std::XMLAttribute>> attributes{};
+    ls_std::XmlReader xmlReader{std::make_shared<ls_std::XmlDocument>(), xmlPath};
+    std::list<std::shared_ptr<ls_std::XmlNode>> children, statesChildren, memoryChildren, connectionChildren{};
+    std::list<std::shared_ptr<ls_std::XmlAttribute>> attributes{};
 
     ASSERT_TRUE(!xmlReader.read().empty());
 
@@ -44,7 +44,7 @@ namespace
 
     // check root element
 
-    std::shared_ptr<ls_std::XMLNode> root = xmlReader.getDocument()->getRootElement();
+    std::shared_ptr<ls_std::XmlNode> root = xmlReader.getDocument()->getRootElement();
     ASSERT_STREQ("stateMachine", root->getName().c_str());
     ASSERT_STREQ("name", root->getAttributes().front()->getName().c_str());
     ASSERT_EQ(1, root->getAttributes().size());
@@ -194,30 +194,30 @@ namespace
     ASSERT_TRUE(ls_std::STLUtils::getListElementAt(memoryChildren, 2)->getAttributes().empty());
   }
 
-  TEST_F(XMLReaderTest, getDocument)
+  TEST_F(XmlReaderTest, getDocument)
   {
     std::string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
-    ls_std::XMLReader xmlReader{std::make_shared<ls_std::XMLDocument>(), xmlPath};
+    ls_std::XmlReader xmlReader{std::make_shared<ls_std::XmlDocument>(), xmlPath};
 
     ASSERT_TRUE(xmlReader.getDocument() != nullptr);
   }
 
-  TEST_F(XMLReaderTest, setDocument)
+  TEST_F(XmlReaderTest, setDocument)
   {
     std::string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
-    std::shared_ptr<ls_std::XMLDocument> document = std::make_shared<ls_std::XMLDocument>();
-    ls_std::XMLReader xmlReader{document, xmlPath};
+    std::shared_ptr<ls_std::XmlDocument> document = std::make_shared<ls_std::XmlDocument>();
+    ls_std::XmlReader xmlReader{document, xmlPath};
     ASSERT_TRUE(xmlReader.getDocument() == document);
 
-    document = std::make_shared<ls_std::XMLDocument>();
+    document = std::make_shared<ls_std::XmlDocument>();
     xmlReader.setDocument(document);
     ASSERT_TRUE(xmlReader.getDocument() == document);
   }
 
-  TEST_F(XMLReaderTest, setFile)
+  TEST_F(XmlReaderTest, setFile)
   {
     std::string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
-    ls_std::XMLReader xmlReader{std::make_shared<ls_std::XMLDocument>(), xmlPath};
+    ls_std::XmlReader xmlReader{std::make_shared<ls_std::XmlDocument>(), xmlPath};
     ls_std::File xmlFile{xmlPath};
     xmlReader.setFile(xmlFile);