#include <mi32/xml.h>

Public Member Functions | |
| XMLDOC (const XMLDOC &) | |
| XMLDOC (const UINT8 *xmlbuffer) | |
| XMLDOC (const MIUNICODE *xmlbuffer) | |
| XMLDOC () | |
| virtual | ~XMLDOC () |
| void | AddEntity (const char *name, MIUNICODE content) |
| void | AddEntity (const char *name, const MIUNICODE *content) |
| void | Clear () |
| xmlDocPtr * | GetDocPtr () const |
| const MISTRING & | GetErrorMessage () const |
| XMLNODE * | GetRootNode () const |
| XMLDOC & | operator= (const XMLDOC &) |
| ERRVALUE | Parse (const UINT8 *xmlbuffer) |
| ERRVALUE | ParseHTML (const UINT8 *xmlbuffer) |
| ERRVALUE | Read (const MIUNICODE *filename) |
| ERRVALUE | Read (const FILEPATH &filepath) |
| ERRVALUE | ReadHTML (const MIUNICODE *filename) |
| ERRVALUE | ReadHTML (const FILEPATH &filepath) |
| void | SetCompression (int compression) |
| void | Unparse (STRUTF8 &string, bool bIndentTreeOutput=true) const |
| void | Unparse (MISTRING &string, bool bIndentTreeOutput=true) const |
| void | UnparseHTML (STRUTF8 &string, bool bIndentTreeOutput=true) const |
| void | UnparseHTML (MISTRING &string, bool bIndentTreeOutput=true) const |
| ERRVALUE | Write (FILE_RAW &file) const |
| ERRVALUE | Write (const MIUNICODE *filename) const |
| ERRVALUE | Write (const FILEPATH &filepath) const |
| ERRVALUE | WriteHTML (FILE_RAW &file) const |
| ERRVALUE | WriteHTML (const MIUNICODE *filename) const |
| ERRVALUE | WriteHTML (const FILEPATH &filepath) const |
Protected Member Functions | |
| virtual void | OnDocReplaced () |
| XMLDOC::XMLDOC | ( | ) |
Constructor. Constructs an empty document.
| XMLDOC::XMLDOC | ( | const MIUNICODE * | xmlbuffer | ) |
Constructor.
Constructs an XML document given one read into memory. Note: MIUNICODE string gets converted to UTF8 before parsing. If you are reading it in UTF8 to begin with, converting it to Unicode and constructing it that way is a waste of time. Use the constructor that takes UTF8 instead.
| XMLDOC::XMLDOC | ( | const UINT8 * | xmlbuffer | ) |
Constructor.
Constructs an XML document given one read into memory (Buffer must be in UTF8 encoding)
| XMLDOC::XMLDOC | ( | const XMLDOC & | ) |
Copy constructor.
Note, copy constructor is expensive. It has to copy the whole document tree in memory.
| virtual XMLDOC::~XMLDOC | ( | ) | [virtual] |
Destructor.
| void XMLDOC::AddEntity | ( | const char * | name, | |
| MIUNICODE | content | |||
| ) |
Add an entity to the XML document defintion.
Allows you to register non-standard entities such as ° This method is the simple case. A single character entity.
| name | Without the "&" or ";" |
| void XMLDOC::AddEntity | ( | const char * | name, | |
| const MIUNICODE * | content | |||
| ) |
Add an entity to the XML document defintion.
Allows you to register non-standard entities such as ° This method is the generic case, multiple-character entity.
| name | Without the "&" or ";" |
| void XMLDOC::Clear | ( | ) |
Reset the document to a single, empty <root> node.
| xmlDocPtr* XMLDOC::GetDocPtr | ( | ) | const |
| const MISTRING& XMLDOC::GetErrorMessage | ( | ) | const |
Returns a string holding the error message from the last call to Parse or Read.
| XMLNODE* XMLDOC::GetRootNode | ( | ) | const |
Get the root node of the document.
| virtual void XMLDOC::OnDocReplaced | ( | ) | [protected, virtual] |
Will be called by Read and Parse methods to inform derived class that the whole document has been changed out from under it.
Assignment operator Note, asignment is expensive.
It has to copy the whole document tree in memory.
Parse an XML document already read into memory.
(Buffer must be in UTF8 encoding)
Reimplemented in HTML::HTMLDOC.
Read an XML file The file must be in UTF8 encoding.
Read an XML file The file must be in UTF8 encoding.
Reimplemented in HTML::HTMLDOC.
| void XMLDOC::SetCompression | ( | int | compression | ) |
| void XMLDOC::Unparse | ( | STRUTF8 & | string, | |
| bool | bIndentTreeOutput = true | |||
| ) | const |
Convert the in-memory structure to a STRUTF8.
| void XMLDOC::Unparse | ( | MISTRING & | string, | |
| bool | bIndentTreeOutput = true | |||
| ) | const |
Convert the in-memory structure to an MISTRING.
| void XMLDOC::UnparseHTML | ( | STRUTF8 & | string, | |
| bool | bIndentTreeOutput = true | |||
| ) | const |
| void XMLDOC::UnparseHTML | ( | MISTRING & | string, | |
| bool | bIndentTreeOutput = true | |||
| ) | const |
Write out to an XML file to an open FILE_RAW Does not try to seek in the file, resize it or close.
It just starts writing at the current file position
Write out to an XML file The resulting file will be in UTF8 encoding.
Write out to an XML file The resulting file will be in UTF8 encoding.
Write out to an XML file Same as Write, but HTML has slightly different formatting rules.
1.6.1