HDK
|
#include <UT_XMLWriter.h>
Public Member Functions | |
UT_XMLWriter () | |
Standard constructor. More... | |
~UT_XMLWriter () | |
bool | beginWritingToFile (const char *file) |
Initializes the writer to write either to memory or to the file. More... | |
bool | beginWritingToMemory (UT_WorkBuffer &memory) |
bool | endWriting () |
bool | setIndentation (int spaces_count) |
Sets the indentation of the XML document elements. More... | |
bool | writeElement (const char *tag, const char *string) |
bool | startElement (const char *tag) |
Begins an element that will contain some other elements or data. More... | |
bool | endElement () |
Ends an element started earlier. More... | |
bool | writeAttribute (const char *name, const char *value) |
bool | writeString (const char *string) |
bool | writeComment (const char *string) |
Writes a comment. More... | |
bool | writeRawString (const char *string) |
bool | writeCDataElement (const char *data) |
Definition at line 31 of file UT_XMLWriter.h.
UT_XMLWriter::UT_XMLWriter | ( | ) |
Standard constructor.
UT_XMLWriter::~UT_XMLWriter | ( | ) |
bool UT_XMLWriter::beginWritingToFile | ( | const char * | file | ) |
Initializes the writer to write either to memory or to the file.
bool UT_XMLWriter::beginWritingToMemory | ( | UT_WorkBuffer & | memory | ) |
bool UT_XMLWriter::endElement | ( | ) |
Ends an element started earlier.
bool UT_XMLWriter::endWriting | ( | ) |
Finishes writing, flushes data, and cleans up after writing. If writing to memory, this method copies the XML stuff to the UT_WorkBuffer passed in earlier. If writing to file, it flushes the document and closes the file.
bool UT_XMLWriter::setIndentation | ( | int | spaces_count | ) |
Sets the indentation of the XML document elements.
bool UT_XMLWriter::startElement | ( | const char * | tag | ) |
Begins an element that will contain some other elements or data.
Sets an attribute for the current element that was started but not yet ended.
bool UT_XMLWriter::writeCDataElement | ( | const char * | data | ) |
Writes a CDATA element. If data contains "]]>" (which is the CDATA termination sequence, then it is split into a few CDATA elements (ending in "]]" and starting with ">" to prevent the occurance of this reserved sequence.
bool UT_XMLWriter::writeComment | ( | const char * | string | ) |
Writes a comment.
Write the whole element, ie:
/// <tag>string</tag> ///
bool UT_XMLWriter::writeRawString | ( | const char * | string | ) |
Writes string as raw characters. The characters are written exactly as they appear, so be careful to use valid XML format, etc.
bool UT_XMLWriter::writeString | ( | const char * | string | ) |
Writes a text string contents data for the current element that was started but not yet ended.