Typedefs | |
| using | Document = rapidxml::xml_document< char > |
| using | Node = rapidxml::xml_node< char > |
| using | NodeType = rapidxml::node_type |
| using | Attribute = rapidxml::xml_attribute< char > |
Functions | |
| Node * | insertDeclaration (Document &doc) |
| Add a declaration to the document if there isn't one already. More... | |
Typedef Documentation
◆ Attribute
| using XML::Attribute = typedef rapidxml::xml_attribute<char> |
◆ Document
| using XML::Document = typedef rapidxml::xml_document<char> |
◆ Node
| using XML::Node = typedef rapidxml::xml_node<char> |
◆ NodeType
| using XML::NodeType = typedef rapidxml::node_type |
Function Documentation
◆ appendAttribute() [1/3]
| Attribute* XML::appendAttribute | ( | Node * | node, |
| const char * | name, | ||
| const char * | value, | ||
| size_t | name_size = 0, |
||
| size_t | value_size = 0 |
||
| ) |
Append an attribute.
- Parameters
-
parent Node to append child to name Name of attribute (copy taken) value Value string (copy taken) Attribute* New attribute
◆ appendAttribute() [2/3]
|
inlinestatic |
◆ appendAttribute() [3/3]
template<typename TString , typename TValue >
| Attribute* XML::appendAttribute | ( | Node * | node, |
| const TString & | name, | ||
| const TValue & | value | ||
| ) |
◆ appendNode() [1/4]
| Node* XML::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.
- Parameters
-
parent Node to append child to name Name of child node (copy taken) value Optional node value (copy taken)
- Return values
-
Node* Child node
- Note
- If provide, sizes do not include nul-terminator Node MUST already be added to the document tree
◆ appendNode() [2/4]
| Node* XML::appendNode | ( | Node * | parent, |
| const String & | name, | ||
| const FlashString & | value | ||
| ) |
◆ appendNode() [3/4]
|
inlinestatic |
◆ appendNode() [4/4]
template<typename TString , typename TValue >
| Node* XML::appendNode | ( | Node * | parent, |
| const TString & | name, | ||
| const TValue & | value | ||
| ) |
◆ deserialize() [1/3]
De-serialise XML text into a document.
- Return values
-
bool false on parse error
- Note
- Document maintains references to content so MUST stay in scope for lifetime of doc, or until doc.clear() is called
◆ deserialize() [2/3]
| bool XML::deserialize | ( | Document & | doc, |
| const FlashString & | content | ||
| ) |
◆ deserialize() [3/3]
◆ getAttribute() [1/3]
◆ getAttribute() [2/3]
◆ getAttribute() [3/3]
◆ getNode() [1/4]
| Node* XML::getNode | ( | const Document & | doc, |
| const char * | path, | ||
| const char * | ns = nullptr, |
||
| size_t | ns_len = 0 |
||
| ) |
◆ getNode() [2/4]
|
inline |
◆ getNode() [3/4]
◆ getNode() [4/4]
◆ getValue() [1/3]
◆ getValue() [2/3]
| String XML::getValue | ( | const Node * | node, |
| const char * | name, | ||
| size_t | name_size, | ||
| const char * | ns = nullptr, |
||
| size_t | ns_size = 0 |
||
| ) |
◆ getValue() [3/3]
◆ insertDeclaration()
Add a declaration to the document if there isn't one already.
- Note
- By default, declarations are included when parsed during de-serialisation. If you need one in the output serialisation, call this function. (We're talking about the "<?xml version="1.0" ?>" at the start)
1.8.17