Functions to efficiently output XML. XML data contains a lot of redundancy so it is more memory efficient to generate the data instead of using a predefined XML document.
More...
|
| | XMLPrinter ()=default |
| | Default constructor.
|
| |
| | XMLPrinter (Print &output) |
| | Constructor with output.
|
| |
| void | setOutput (Print &output) |
| | Defines the output Print object.
|
| |
| size_t | printXMLHeader () |
| | Prints the XML header.
|
| |
| size_t | printNode (XMLNode node) |
| | Prints an XML node from XMLNode struct.
|
| |
| size_t | printNode (const char *node, XMLNode child, const char *attributes=nullptr) |
| | Prints an XML node with a single child.
|
| |
| size_t | printNode (const char *node, Vector< XMLNode > children, const char *attributes=nullptr) |
| | Prints an XML node with multiple children.
|
| |
| size_t | printNode (const char *node, const char *txt=nullptr, const char *attributes=nullptr) |
| | Prints an XML node with text content.
|
| |
| size_t | printNode (const char *node, int txt, const char *attributes=nullptr) |
| | Prints an XML node with integer content.
|
| |
| size_t | printNode (const char *node, std::function< size_t(void)> callback, const char *attributes=nullptr) |
| | Prints an XML node using a callback for content.
|
| |
| size_t | printNode (const char *node, std::function< size_t(void *)> callback, void *ref, const char *attributes=nullptr) |
| | Prints an XML node using a callback that receives a context pointer.
|
| |
| size_t | printNode (const char *node, size_t(*callback)(void *), void *ref, const char *attributes=nullptr) |
| | Prints an XML node using a plain function pointer that receives a context pointer.
|
| |
| size_t | printNode (const char *node, std::function< size_t(Print &, void *)> callback, void *ref, const char *attributes=nullptr) |
| | Prints an XML node using a callback that receives the Print& and a context pointer.
|
| |
| size_t | printNode (const char *node, size_t(*callback)(Print &, void *), void *ref, const char *attributes=nullptr) |
| | Prints an XML node using a plain function pointer that receives Print& and a context pointer.
|
| |
| size_t | printf (const char *fmt,...) |
| | printf-style helper that formats into an internal buffer and writes to the configured Print output.
|
| |
| size_t | printArgument (const char *name, const char *direction, const char *relatedStateVariable=nullptr) |
| | Helper to print a UPnP <argument> element with name, direction and optional relatedStateVariable.
|
| |
| size_t | printStateVariable (const char *name, const char *dataType, bool sendEvents=false, std::function< void()> extra=nullptr) |
| | Helper to print a UPnP <stateVariable> element with name, dataType and optional sendEvents attribute and inner content callback.
|
| |
| size_t | printNodeBegin (const char *node, const char *attributes=nullptr, const char *ns=nullptr) |
| | Prints the beginning of an XML node.
|
| |
| size_t | printNodeBeginNl (const char *node, const char *attributes=nullptr, const char *ns=nullptr) |
| | Prints the beginning of an XML node and a newline.
|
| |
| size_t | printNodeEnd (const char *node, const char *ns=nullptr) |
| | Prints the end of an XML node.
|
| |
| void | clear () |
| |
Functions to efficiently output XML. XML data contains a lot of redundancy so it is more memory efficient to generate the data instead of using a predefined XML document.
- Author
- Phil Schatzmann