Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
P6R::p6ISAX2XMLReader Interface Referenceabstract

#include <p6sax2xmlreader.h>

Inherits P6R::p6ICom.

Public Member Functions

virtual P6INT32 addref (void)=0
 
virtual P6R::P6ERR getContentHandler (p6ISAX2ContentHandler **pObject)=0
 
virtual P6R::P6ERR getDTDHandler (p6ISAX2DTDHandler **pObject)=0
 
virtual P6R::P6ERR getEntityResolver (p6ISAX2EntityResolver **pObject)=0
 
virtual P6R::P6ERR getErrorHandler (p6ISAX2ErrorHandler **pObject)=0
 
virtual P6R::P6ERR getFeature (const P6CHAR *pString, P6BOOL *pResult)=0
 
virtual P6R::P6ERR getProperty (const P6CHAR *pString, P6VOID **pObject)=0
 
virtual P6R::P6ERR initialize (P6SAX2FLAGS flags)=0
 
virtual P6R::P6ERR queryInterface (const P6R::P6IID &iid, P6VOID **ppIface)=0
 
virtual P6INT32 release (void)=0
 
virtual P6R::P6ERR releaseAllHandlers (void)=0
 
virtual P6R::P6ERR setContentHandler (p6ISAX2ContentHandler *pObject)=0
 
virtual P6R::P6ERR setDTDHandler (p6ISAX2DTDHandler *pObject)=0
 
virtual P6R::P6ERR setEntityResolver (p6ISAX2EntityResolver *pObject)=0
 
virtual P6R::P6ERR setErrorHandler (p6ISAX2ErrorHandler *pObject)=0
 
virtual P6R::P6ERR setFeature (const P6CHAR *pString, P6BOOL result)=0
 
virtual P6R::P6ERR setProperty (const P6CHAR *pString, P6VOID *pObject)=0
 

Detailed Description

This is the main SAX interface.

Notice that there is no separate parse function. That is because this component implements the p6IDataStream interface (see p6datastream.h). Thus this component supports the parsing of a stream of XML data.

To parse either a single buffer or a stream of XML buffers perform the following steps:

* First get an XML reader object:
* p6ISAX2XMLReader *pReader;
* P6ERR err = p6CreateInstance( NULL, CID_p6SAX2XMLReader, VALIDATEIF( p6ISAX2XMLReader, &pReader ));
*
* Then using the XML reader, get the p6IDataStream interface on that component:
* p6IDataStream *pStream;
* err = pReader->queryInterface( VALIDATEIF( p6IDataStream, &pStream ));
*
* Initialize the data stream interface:
* err = pStream->beginStream();
*
* Pass the buffer(s) to be parsed one at a time:
* err = pStream->processStream( buffer, bufSize ); // -> 1st buffer of stream
* . . . . . .
* err = pStream->processStream( buffer, bufSize ); // -> nth buffer of stream
*
* The input 'buffer' to the processStream() method is where the P6SAX2STRING pointers will often point to.
* The processStream() function can return an "eEndOfFile" error code to indicate that it is done with the
* buffer provided and that the buffer is incomplete (i.e., the XML top most element has not yet been closed).
*
* Close the stream down:
* err = pStream->endStream();
* pStream->release();
*
*

For the setFeature() method the following features are supported:

  (1) http://xml.org/sax/features/namespaces (defaults to false),
     namespace names always returned even if this is set to false,
     p6ISAX2ContentHandler::startPrefixMapping and p6ISAX2ContentHandler::endPrefixMapping called if set to true.
  (2) http://xml.org/sax/features/namespaces-prefixes (defaults to false),
     qualified names (qNames) are always returned even if this is set to false,
     attribues with names beginning with 'xmlns' are not suppressed, i.e., returned to applicaiton just like all other attributes.
  

Definition at line 91 of file p6sax2xmlreader.h.


The documentation for this interface was generated from the following file: