|
| Node * | insertDeclaration (Document &doc) |
| | Add a declaration to the document if there isn't one already. More...
|
| |
|
| bool | deserialize (Document &doc, char *content) |
| | De-serialise XML text into a document. More...
|
| |
| static bool | deserialize (Document &doc, String &content) |
| |
| bool | deserialize (Document &doc, const FlashString &content) |
| |
|
| size_t | serialize (const Node &node, String &buffer, bool pretty=false) |
| | Serialize XML text and append to string buffer. More...
|
| |
| String | serialize (const Node &node, bool pretty=false) |
| |
| size_t | serialize (const Node &node, Print &out, bool pretty=false) |
| |
| static size_t | serialize (const Node &node, Print *out, bool pretty=false) |
| |
|
| Node * | appendNode (Node *parent, const char *name, const char *value=nullptr, size_t name_size=0, size_t value_size=0) |
| | Append a child element with optional value. More...
|
| |
| static Node * | appendNode (Node *parent, const String &name, const String &value=nullptr) |
| |
| Node * | appendNode (Node *parent, const String &name, const FlashString &value) |
| |
| template<typename TString , typename TValue > |
| Node * | appendNode (Node *parent, const TString &name, const TValue &value) |
| |
|
| Attribute * | appendAttribute (Node *node, const char *name, const char *value, size_t name_size=0, size_t value_size=0) |
| | Append an attribute. More...
|
| |
| static Attribute * | appendAttribute (Node *node, const String &name, const String &value) |
| |
| template<typename TString , typename TValue > |
| Attribute * | appendAttribute (Node *node, const TString &name, const TValue &value) |
| |
|
- Parameters
-
| doc | |
| path | Node path using slash as separator |
| ns | Optional namespace |
- Return values
-
| Node* | nullptr if none is found |
Leading/trailing separators are not permitted.
|
| Node * | getNode (Node *node, const char *path, const char *ns, size_t ns_len=0) |
| |
| Node * | getNode (Node *node, const String &path, const String &ns=nullptr) |
| |
|
- Parameters
-
| doc | |
| path | Node path using slash as separator |
| ns | Optional namespace |
- Return values
-
| Node* | nullptr if none is found |
Leading separator is important: if present, search starts at root node. If omitted, first element must match the root node name.
Trailing separator is not allowed.
Example 1: /s:Body/u:GetContentResponse Will search for s:Body node that is a child of the root node. The node u:GetContentResponse should be child of the s:Body node
Example 2: s:Envelope/s:Body/u:GetContentResponse Will search for s:Body node that is a child of the root node named s:Envelope. The node u:GetContentResponse should be child of the s:Body node
|
| Node * | getNode (const Document &doc, const char *path, const char *ns=nullptr, size_t ns_len=0) |
| |
| Node * | getNode (const Document &doc, const String &path, const String &ns=nullptr) |
| |
|
- Parameters
-
- Return values
-
| String | invalid if node or name not found |
|
| String | getValue (const Node *node, const char *name, size_t name_size, const char *ns=nullptr, size_t ns_size=0) |
| |
| String | getValue (const Node *node, const char *name, const char *ns=nullptr) |
| |
| String | getValue (const Node *node, const String &name, const String &ns=nullptr) |
| |
|
- Parameters
-
- Return values
-
| String | invalid if node or name not found |
|
| String | getAttribute (const Node *node, const char *name, size_t name_size) |
| |
| String | getAttribute (const Node *node, const char *name) |
| |
| String | getAttribute (const Node *node, const String &name) |
| |