|
| OmXmlWriter (OmIByteStream *consumer) |
| Instantiate an XML writer to write into the specified buffer.
|
|
void | beginElement (const char *elementName) |
| Begins a new XML element, like <elementName>
|
|
void | beginElement (const char *elementName, const char *attribute1, const char *value1) |
| Begins a new XML element with one attribute already in it, like <elementName attr="value">
|
|
void | addContent (const char *content) |
| Adds text to an element, like <element>content</element>
|
|
void | addContentRaw (const char *content) |
| Adds text to the document ignoring XML rules But also needed things like rendering DOCTYPE at the start. Caution.
|
|
void | addContentF (const char *fmt,...) |
| Adds text to an element, using printf semantics.
|
|
void | addAttribute (const char *attribute, const char *value) |
| Adds an attribute to an element, like <element attr="value">
|
|
void | addAttributeF (const char *attribute, const char *fmt,...) |
| Adds an attribute to an element, using printf semantics.
|
|
void | addAttributeFBig (int reserve, const char *attribute, const char *fmt,...) |
| Handle oversized attribute. :-/.
|
|
void | addAttributeUrlF (const char *attribute, const char *fmt,...) |
| Adds an attribute to an element, using printf semantics, and %20 escapes.
|
|
void | addAttribute (const char *attribute, long long int value) |
| Adds an attribute to an element from an integer.
|
|
void | addElement (const char *elementName) |
| Adds an element with no attributes or content (no need for endElement()) like <hr/>
|
|
void | addElement (const char *elementName, const char *content) |
| Adds an element with content (no need for endElement()) like <h1>Content</h1>
|
|
void | addElementF (const char *elementName, const char *fmt,...) |
| Adds an element with content (no need for endElement()) like <h1>Content</h1>
|
|
void | endElement () |
| Ends the most recent beginElement(). Caps them with either <element/> or </element>.
|
|
void | endElement (const char *elementName) |
| Ends most recent beginElement, and prints error message if element name does not match.
|
|
void | endElements () |
| Ends any remaining elements.
|
|
void | addRawContent (const char *rawContent) |
| Add content directly to the output stream, no escaping or element balancing. You can definitely break your XML output with this! Use wisely.
|
|
void | setIndenting (int onOff) |
| Enables primitive formatting. Uses more bytes of buffer.
|
|
int | getErrorCount () |
| Returns nonzero of any errors occurred, usually buffer overruns leading to missing portions.
|
|
unsigned int | getByteCount () |
| Bytes written.
|
|
bool | put (uint8_t ch) override |
|
bool | done () override |
|
void | beginAttribute (const char *attributeName) |
|
void | endAttribute () |
|
void | putf (const char *fmt,...) |
|
bool | puts (const char *stuff, bool contentEscapes=false) |
|
virtual bool | putS (const char *s) |
| convenience routine, same as put byte-by-byte.
|
|
Writes formatted XML to an OmIByteStream, streaming as it goes (mostly)