mimas::xml_document Class Reference
[XML parser]

Class for parsing XML documents. More...

#include <xml_document.h>

Inheritance diagram for mimas::xml_document:

Inheritance graph
[legend]
Collaboration diagram for mimas::xml_document:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 xml_document (const std::string &schemaURI)
 Initialise xml-parser.
void load (const char *fileName) throw (mimasexception)
 Load XML-file.
void save (const char *fileName) throw (mimasexception)
 Save XML-file.
void fromString (const std::string &string) throw (mimasexception)
 Read XML-document from string.
void fromInputSource (InputSource &inputSource) throw (mimasexception)
 Read XML-document from Xerces-input-source.
const XalanDocument * getDocument (void) const
 Get pointer to XML-DOM.
xml_reference< XalanElement > getDocumentElement (void)
 Get root-element of XML-DOM.

Protected Attributes

xml_errorhandler xmlErrorHandler
 Error handler for catching parse errors.
const XalanDocument * document
 The XML DOM.

Detailed Description

Class for parsing XML documents.

Don't forget to add the following initialization code to your main application, before using this class:

    XMLPlatformUtils::Initialize();
    XPathInit oTheXPathInit;
    
After using this class, execute the following code:
    XMLPlatformUtils::Terminate();
    
See Apache Xerces and Xalan documentation for more details.
Author:
Jan Wedekind (jan at wedesoft.de)
Date:
Wed Jan 12 13:53:41 UTC 2004

Definition at line 66 of file xml_document.h.


Constructor & Destructor Documentation

mimas::xml_document::xml_document ( const std::string &  schemaURI  ) 

Initialise xml-parser.

A URI for verification consists of two parts:


Member Function Documentation

void mimas::xml_document::load ( const char *  fileName  )  throw (mimasexception)

Load XML-file.

Load a XML-file and perform verification, if necessary.

Parameters:
fileName Name of file to load.

void mimas::xml_document::save ( const char *  fileName  )  throw (mimasexception)

Save XML-file.

Parameters:
fileName Name of file to write XML-document to.

void mimas::xml_document::fromString ( const std::string &  string  )  throw (mimasexception)

Read XML-document from string.

Parameters:
string String to read XML-document from.

void mimas::xml_document::fromInputSource ( InputSource &  inputSource  )  throw (mimasexception)

Read XML-document from Xerces-input-source.

Parameters:
inputSource An object of input-source-type.

const XalanDocument* mimas::xml_document::getDocument ( void   )  const [inline]

Get pointer to XML-DOM.

Returns:
Pointer to XML-DOM.

Definition at line 92 of file xml_document.h.

References document.

xml_reference< XalanElement > mimas::xml_document::getDocumentElement ( void   )  [inline]

Get root-element of XML-DOM.

Returns:
Wrapper-object for root-element of XML-DOM.

Definition at line 96 of file xml_document.h.

References document.

XalanSourceTreeDOMSupport* mimas::xml_document::getDOMSupport ( void   )  [inline]

Definition at line 103 of file xml_document.h.

References theDOMSupport.

XPathEnvSupportDefault* mimas::xml_document::getEnvSupport ( void   )  [inline]

Definition at line 106 of file xml_document.h.

References theEnvSupport.

XPathFactoryDefault* mimas::xml_document::getXPathFactory ( void   )  [inline]

Definition at line 113 of file xml_document.h.

XPathExecutionContextDefault* mimas::xml_document::getExecutionContext ( void   )  [inline]

Definition at line 115 of file xml_document.h.

References theExecutionContext.

XalanSourceTreeDOMSupport* mimas::xml_document::getDOMSupport ( void   )  [inline]

Definition at line 103 of file xml_document.h.

References theDOMSupport.

XPathEnvSupportDefault* mimas::xml_document::getEnvSupport ( void   )  [inline]

Definition at line 106 of file xml_document.h.

References theEnvSupport.

XPathFactoryDefault* mimas::xml_document::getXPathFactory ( void   )  [inline]

Definition at line 113 of file xml_document.h.

XPathExecutionContextDefault* mimas::xml_document::getExecutionContext ( void   )  [inline]

Definition at line 115 of file xml_document.h.

References theExecutionContext.


Member Data Documentation

XalanSourceTreeDOMSupport mimas::xml_document::theDOMSupport [protected]

Definition at line 123 of file xml_document.h.

Referenced by getDOMSupport().

XalanSourceTreeParserLiaison mimas::xml_document::theLiaison [protected]

Definition at line 125 of file xml_document.h.

xml_errorhandler mimas::xml_document::xmlErrorHandler [protected]

Error handler for catching parse errors.

Definition at line 128 of file xml_document.h.

const XalanDocument* mimas::xml_document::document [protected]

The XML DOM.

Definition at line 130 of file xml_document.h.

Referenced by getDocument(), and getDocumentElement().

XPathEnvSupportDefault mimas::xml_document::theEnvSupport [protected]

Definition at line 135 of file xml_document.h.

Referenced by getEnvSupport().

XObjectFactoryDefault mimas::xml_document::theXObjectFactory [protected]

Definition at line 137 of file xml_document.h.

XPathFactoryDefault mimas::xml_document::theXPathFactory [protected]

Definition at line 144 of file xml_document.h.

XPathExecutionContextDefault mimas::xml_document::theExecutionContext [protected]

Definition at line 146 of file xml_document.h.

Referenced by getExecutionContext().

XalanSourceTreeDOMSupport mimas::xml_document::theDOMSupport [protected]

Definition at line 123 of file xml_document.h.

Referenced by getDOMSupport().

XalanSourceTreeParserLiaison mimas::xml_document::theLiaison [protected]

Definition at line 125 of file xml_document.h.

XPathEnvSupportDefault mimas::xml_document::theEnvSupport [protected]

Definition at line 135 of file xml_document.h.

Referenced by getEnvSupport().

XObjectFactoryDefault mimas::xml_document::theXObjectFactory [protected]

Definition at line 137 of file xml_document.h.

XPathFactoryDefault mimas::xml_document::theXPathFactory [protected]

Definition at line 144 of file xml_document.h.

XPathExecutionContextDefault mimas::xml_document::theExecutionContext [protected]

Definition at line 146 of file xml_document.h.

Referenced by getExecutionContext().


The documentation for this class was generated from the following file:
[GNU/Linux] [Qt] [Mesa] [STL] [Lapack] [Boost] [Magick++] [Xalan-C and Xerces-C] [doxygen] [graphviz] [FFTW] [popt] [xine] [Gnuplot] [gnu-arch] [gcc] [gstreamer] [autoconf/automake/make] [freshmeat.net] [opensource.org] [sourceforge.net] [MMVL]
mimas 2.1 - Copyright Mon Oct 30 11:31:48 2006, Bala Amavasai, Stuart Meikle, Arul Selvan, Fabio Caparrelli, Jan Wedekind, Manuel Boissenin, ...