Rudiments
Public Member Functions
xmldom Class Reference

Inherits xmlsax.

List of all members.

Public Member Functions

 xmldom ()
virtual ~xmldom ()
bool parseFile (const char *filename)
bool parseString (const char *string)
xmldomnodegetRootNode () const
void createRootNode ()
bool writeFile (const char *filename, mode_t perms) const

Detailed Description

The xmldom class implements a minimal XML DOM parser.


Constructor & Destructor Documentation

xmldom::xmldom ( )

Creates a new instance of the xmldom class.

virtual xmldom::~xmldom ( ) [virtual]

Deletes this instance of the xmldom class.


Member Function Documentation

void xmldom::createRootNode ( )

Creates a new root node. This is useful for building a tree from scratch.

xmldomnode* xmldom::getRootNode ( ) const

Returns the root node of the DOM tree.

bool xmldom::parseFile ( const char *  filename)

Parses file "filename" and generates a DOM tree.

Reimplemented from xmlsax.

bool xmldom::parseString ( const char *  string)

Parses string "string" and generates a DOM tree.

Reimplemented from xmlsax.

bool xmldom::writeFile ( const char *  filename,
mode_t  perms 
) const

Writes the current DOM tree to "filename" and sets permissions of the file to "perms".