Represents a DOM document. More...
#include <Valuable/DOMDocument.hpp>
Public Member Functions | |
| void | appendChild (DOMElement element) |
| Appends an element to the document. | |
| DOMElement | createElement (const QString &name) |
| Creates a new DOM element with the given name. More... | |
| DOMElement | getDocumentElement () |
| Returns the main document element. | |
| bool | readFromFile (const QString &filename, bool validate=false) |
| Parse a document from a file. More... | |
| bool | readFromMem (const QByteArray &buffer) |
| bool | writeToFile (const QString &filename) |
| Writes the document to a file. | |
| bool | writeToMem (QByteArray &buf) |
| Writes the document to memory. | |
Static Public Member Functions | |
| static DOMDocument * | createDocument () |
| Creates a new DOM document. | |
Represents a DOM document.
| DOMElement Valuable::DOMDocument::createElement | ( | const QString & | name | ) |
Creates a new DOM element with the given name.
| name | Tag name of the DOM element |
| bool Valuable::DOMDocument::readFromFile | ( | const QString & | filename, |
| bool | validate = false |
||
| ) |
Parse a document from a file.
| filename | name of the file to read from |
| validate | if set to true, the XML must validate (it must have a schema) |