Class representing an XML document. More...
#include <XmlDocument.hpp>
Public Member Functions | |
XmlDocument * | clone () |
shared_ptr< XmlElement > | getRootElement () |
bool | isValid () |
bool | isWellFormed () |
XmlDocument & | operator= (const XmlDocument &xd) |
Assignment operator. | |
void | parseFile (string name, bool enforceDtdValidation=true) |
Parses XML file. | |
void | parseString (string xml) |
Parses an XML string. | |
XmlDocument (const XmlDocument &xd) | |
Copy constructor. | |
XmlDocument () | |
Constructor. | |
~XmlDocument () |
Class representing an XML document.
Definition at line 66 of file XmlDocument.hpp.
XmlDocument::XmlDocument | ( | ) |
Constructor.
This method creates a new XmlDocument instance.
Definition at line 46 of file XmlDocument.cpp.
XmlDocument::XmlDocument | ( | const XmlDocument & | xd | ) |
Copy constructor.
Definition at line 55 of file XmlDocument.cpp.
XmlDocument::~XmlDocument | ( | ) |
Destructor. This method makes deinitializations for objects of this class.
Definition at line 69 of file XmlDocument.cpp.
shared_ptr< XmlElement > XmlDocument::getRootElement | ( | ) |
Get the root element of the document.
Definition at line 199 of file XmlDocument.cpp.
bool XmlDocument::isValid | ( | ) |
Checks if the document is valid.
Definition at line 219 of file XmlDocument.cpp.
bool XmlDocument::isWellFormed | ( | ) |
Checks if the document is well formed.
Definition at line 212 of file XmlDocument.cpp.
XmlDocument & XmlDocument::operator= | ( | const XmlDocument & | xd | ) |
Assignment operator.
Definition at line 76 of file XmlDocument.cpp.
void XmlDocument::parseFile | ( | string | name, | |
bool | enforceDtdValidation = true | |||
) |
Parses XML file.
name | - Name of the file to be parsed. | |
enforceDtdValidation | - if true, parsing will only be done if file is valid according to its DTD |
Exception | If an error occurs while parsing the file |
Definition at line 88 of file XmlDocument.cpp.
void XmlDocument::parseString | ( | string | xml | ) |
Parses an XML string.
xml | XML string |
Exception | If an error occurs while parsing the string |
Definition at line 154 of file XmlDocument.cpp.