MQXmlDocument class

(new in Rev4.10)

MQXmlDocument class manages a xml document.

You can load or save a xml file and edit it's content.


MQXmlDocument MQXmlDocument::Create();

It creates a xml document

MQXmlDocument is a pointer of MQCXmlDocument, and you write like

MQXmlDocument doc = MQCXmlDocument::Create();

to create it.

A created document must be deleted by DeleteThis().


void MQXmlDocument::DeleteThis();

It deletes a xml document.


MQXmlElement MQXmlDocument::CreateRootElement(const char *name);
MQXmlElement MQXmlDocument::CreateRootElement(const wchar_t *name);

name
Root element name
Return value
Root XML element

It creates a root element for saving.


MQXmlElement MQXmlDocument::GetRootElement();

Return value
Root XML elememnt (NULL if not exist)

It returns a root XML element.


BOOL MQXmlDocument::LoadFile(const char *filename);
BOOL MQXmlDocument::LoadFile(const wchar_t *filename);

filename
A filename
Return value
Succeeded or failed

It loads the specified xml file.

An encoding of the XML file must be UTF-8 or UTF-16. A file in the other encoding cannot be loaded.


BOOL MQXmlDocument::SaveFile(const char *filename);
BOOL MQXmlDocument::SaveFile(const wchar_t *filename);

filename
A filename
Return value
Succeeded or failed

It saved a xml file.