mermaid::support::xml::XmlDocument Class Reference

Class representing an XML document. More...

#include <XmlDocument.hpp>

Collaboration diagram for mermaid::support::xml::XmlDocument:
Collaboration graph
[legend]

List of all members.

Public Member Functions

XmlDocumentclone ()
shared_ptr< XmlElementgetRootElement ()
bool isValid ()
bool isWellFormed ()
XmlDocumentoperator= (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 ()

Detailed Description

Class representing an XML document.

Author:
Marco Barbosa + Nelson Ramos

Definition at line 66 of file XmlDocument.hpp.


Constructor & Destructor Documentation

XmlDocument::XmlDocument (  ) 

Constructor.

This method creates a new XmlDocument instance.

Author:
Marco Barbosa + Nelson Ramos

Definition at line 46 of file XmlDocument.cpp.

XmlDocument::XmlDocument ( const XmlDocument xd  ) 

Copy constructor.

Author:
Marco Barbosa

Definition at line 55 of file XmlDocument.cpp.

XmlDocument::~XmlDocument (  ) 

Destructor. This method makes deinitializations for objects of this class.

Author:
Marco Barbosa + Nelson Ramos

Definition at line 69 of file XmlDocument.cpp.


Member Function Documentation

shared_ptr< XmlElement > XmlDocument::getRootElement (  ) 

Get the root element of the document.

Returns:
bool TRUE if successful, FALSE otherwise.
Author:
Marco Barbosa + Nelson Ramos

Definition at line 199 of file XmlDocument.cpp.

bool XmlDocument::isValid (  ) 

Checks if the document is valid.

Returns:
bool TRUE if document is valid, FALSE otherwise.
Author:
Marco Barbosa

Definition at line 219 of file XmlDocument.cpp.

bool XmlDocument::isWellFormed (  ) 

Checks if the document is well formed.

Returns:
bool TRUE if document is well formed, FALSE otherwise.
Author:
Marco Barbosa

Definition at line 212 of file XmlDocument.cpp.

XmlDocument & XmlDocument::operator= ( const XmlDocument xd  ) 

Assignment operator.

Author:
Marco Barbosa

Definition at line 76 of file XmlDocument.cpp.

void XmlDocument::parseFile ( string  name,
bool  enforceDtdValidation = true 
)

Parses XML file.

Parameters:
name - Name of the file to be parsed.
enforceDtdValidation - if true, parsing will only be done if file is valid according to its DTD
Exceptions:
Exception If an error occurs while parsing the file
Author:
Marco Barbosa + Nelson Ramos

Definition at line 88 of file XmlDocument.cpp.

void XmlDocument::parseString ( string  xml  ) 

Parses an XML string.

Todo:
Implement DTD validation
Parameters:
xml XML string
Exceptions:
Exception If an error occurs while parsing the string
Author:
Marco Barbosa + Nelson Ramos

Definition at line 154 of file XmlDocument.cpp.

Generated on Fri Mar 4 22:15:54 2011 for MeRMaID::support by  doxygen 1.6.3