AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
XmlSerializer.h
1
6#pragma once
7
8#include <aws/core/Core_EXPORTS.h>
9
10#include <aws/core/utils/Outcome.h>
11#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13
14namespace Aws
15{
16 namespace External
17 {
18 namespace tinyxml2
19 {
20 class XMLNode;
21
22 class XMLDocument;
23 } // namespace tinyxml2
24 } // namespace External
25} // namespace Aws
26
27namespace Aws
28{
29 template<typename PAYLOAD_TYPE>
30 class AmazonWebServiceResult;
31 namespace Client
32 {
33 enum class CoreErrors;
34 template<typename ERROR_TYPE>
35 class AWSError;
36 class AWSXMLClient;
37 } // namespace Client
38 namespace Utils
39 {
40 namespace Xml
41 {
45 AWS_CORE_API Aws::String DecodeEscapedXmlText(const Aws::String& textToDecode);
46
47 class XmlDocument;
48
52 class AWS_CORE_API XmlNode
53 {
54 public:
58 XmlNode(const XmlNode& other);
62 XmlNode& operator=(const XmlNode& other);
66 const Aws::String GetName() const;
70 void SetName(const Aws::String& name);
74 const Aws::String GetAttributeValue(const Aws::String& name) const;
78 void SetAttributeValue(const Aws::String& name, const Aws::String& value);
86 void SetText(const Aws::String& textValue);
90 bool HasNextNode() const;
98 XmlNode NextNode(const char* name) const;
102 XmlNode NextNode(const Aws::String& name) const;
110 XmlNode FirstChild(const char* name) const;
114 XmlNode FirstChild(const Aws::String& name) const;
118 bool HasChildren() const;
134 bool IsNull();
135
136 private:
138 m_node(node), m_doc(&document)
139 {
140 }
141
142 //we do not own these.... I just had to change it from ref because the compiler was
143 //confused about which assignment operator to call. Do not... I repeat... do not delete
144 //these pointers in your destructor.
145 Aws::External::tinyxml2::XMLNode* m_node = nullptr;
146 const XmlDocument* m_doc = nullptr;
147
148 friend class XmlDocument;
149 };
150
155 class AWS_CORE_API XmlDocument
156 {
157 public:
164
167
169
182 bool WasParseSuccessful() const;
199
200 private:
201 void InitDoc();
202
204
205 friend class XmlNode;
206
207 //allow outcome call the default constructor to handle it's error case.
208 friend class Aws::Utils::Outcome<Aws::AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>, Aws::Client::AWSError<Aws::Client::CoreErrors>>;
209 friend class Aws::AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>;
210 template<typename T>
211 friend class Client::AWSError;
213 };
214
215 } // namespace Xml
216 } // namespace Utils
217} // namespace Aws
XmlDocument & operator=(const XmlDocument &other)
XmlDocument(const XmlDocument &other)
XmlDocument & operator=(XmlDocument &&other)
static XmlDocument CreateFromXmlString(const Aws::String &)
XmlDocument(XmlDocument &&doc)
Aws::String ConvertToString() const
Aws::String GetErrorMessage() const
XmlNode GetRootElement() const
static XmlDocument CreateFromXmlStream(Aws::IOStream &)
static XmlDocument CreateWithRootNode(const Aws::String &)
const Aws::String GetAttributeValue(const Aws::String &name) const
XmlNode FirstChild(const Aws::String &name) const
XmlNode CreateChildElement(const Aws::String &name)
const Aws::String GetName() const
XmlNode FirstChild() const
void SetText(const Aws::String &textValue)
XmlNode NextNode(const Aws::String &name) const
XmlNode NextNode() const
Aws::String GetText() const
void SetAttributeValue(const Aws::String &name, const Aws::String &value)
void SetName(const Aws::String &name)
XmlNode & operator=(const XmlNode &other)
XmlNode CreateSiblingElement(const Aws::String &name)
XmlNode FirstChild(const char *name) const
XmlNode(const XmlNode &other)
XmlNode NextNode(const char *name) const
XmlNode Parent() const
AWS_CORE_API Aws::String DecodeEscapedXmlText(const Aws::String &textToDecode)
std::basic_iostream< char, std::char_traits< char > > IOStream
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition AWSString.h:97
Aws::Client::AWSError< CoreErrors > AWSError