Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

util::xml::XMLParser Class Reference

#include <XMLParser.h>

Inheritance diagram for util::xml::XMLParser:

util::Object List of all members.

Detailed Description

XMLParser is a class that can be used to parse XML documents.

It may be used in a streaming mode or as a DOM-like parser. The objects representing XML markup are close approximations to those defined in the DOM 1.0 specification.


Public Methods

 XMLParser ()
 Create a new XML parser.

NodegetNextNode (std::istream &in) throw (util::io::IOException&, XMLException&)
 Get the XML element from an input stream.

DocumentreadDocument (std::istream &in) throw (util::io::IOException&, XMLException&)
 Read an XML document and return a pointer to a newly allocated Document object.

NodereadFragment (std::istream &in) throw (util::io::IOException&, XMLException&)
 Read a fragment of an XML document.


Member Function Documentation

Node * util::xml::XMLParser::getNextNode std::istream &    in throw (util::io::IOException&, XMLException&)
 

Get the XML element from an input stream.

The next element may be any XML document element inherited from Node.

Parameters:
in  an input stream
Returns:
a newly allocated Node object
Exceptions:
IOException  & if a reading error occurs
XMLException  & if the stream is not properly formatted

Document * util::xml::XMLParser::readDocument std::istream &    in throw (util::io::IOException&, XMLException&)
 

Read an XML document and return a pointer to a newly allocated Document object.

The document must be a well-formed XML document, i.e. it must start with <?xml version="1.0"?>, have a single root element, nest properly, etc.

Parameters:
in  an input stream
Exceptions:
IOException  & if a reading error occurs
XMLException  & if the stream is not properly formatted

Node * util::xml::XMLParser::readFragment std::istream &    in throw (util::io::IOException&, XMLException&)
 

Read a fragment of an XML document.

If the next Node red from a stream is an Element, its children will be read as well.


The documentation for this class was generated from the following files:
Documentation generated on 11.09.2003 with Doxygen.
The documentation is copyrighted material.
Copyright © Topi Mäenpää 2003. All rights reserved.