Xalan-C++ API Reference  1.12.0
Classes | Public Member Functions | List of all members
xalanc::XMLParserLiaison Class Referenceabstract

#include <xalanc/XMLSupport/XMLParserLiaison.hpp>

Inheritance diagram for xalanc::XMLParserLiaison:
[legend]

Classes

class  EnsureDestroyDocument
 
class  EnsureResetErrorHandler
 

Public Member Functions

 XMLParserLiaison ()
 
virtual ~XMLParserLiaison ()
 
virtual void reset ()=0
 Reset the instance, freeing any XalanDocument instances created through parseXMLStream(). More...
 
virtual ExecutionContextgetExecutionContext () const =0
 Get a pointer to the current ExecutionContext instance, which may be null. More...
 
virtual MemoryManager & getMemoryManager ()=0
 Get a reference to the current MemoryManager instance. More...
 
virtual void setExecutionContext (ExecutionContext &theContext)=0
 Set the current ExecutionContext instance. More...
 
virtual XalanDocumentparseXMLStream (const InputSource &inputSource, const XalanDOMString &identifier)=0
 Parse the text pointed at by the reader as XML, and return a DOM Document interface. More...
 
virtual void parseXMLStream (const InputSource &inputSource, DocumentHandler &handler, const XalanDOMString &identifier)=0
 Parse the text pointed at by the reader as XML. More...
 
virtual void destroyDocument (XalanDocument *theDocument)=0
 Destroy the supplied XalanDocument instance. More...
 
virtual int getIndent () const =0
 Get the amount to indent when indent-result="yes". More...
 
virtual void setIndent (int i)=0
 Set the amount to indent when indent-result="yes". More...
 
virtual bool getUseValidation () const =0
 Get whether or not validation will be performed. More...
 
virtual void setUseValidation (bool b)=0
 If set to true, validation will be performed. More...
 
virtual const XalanDOMStringgetParserDescription (XalanDOMString &theResult) const =0
 Return a string suitable for telling the user what parser is being used. More...
 
virtual EntityResolver * getEntityResolver () const =0
 This method returns the installed EntityResolver. More...
 
virtual void setEntityResolver (EntityResolver *resolver)=0
 This method installs the user-specified EntityResolver on the parser. More...
 
virtual XMLEntityResolver * getXMLEntityResolver () const =0
 This method returns the installed XMLEntityResolver. More...
 
virtual void setXMLEntityResolver (XMLEntityResolver *resolver)=0
 This method installs the user-specified XMLEntityResolver on the parser. More...
 
virtual ErrorHandler * getErrorHandler () const =0
 This method returns the installed error handler. More...
 
virtual void setErrorHandler (ErrorHandler *handler)=0
 This method installs the user-specified error handler. More...
 

Detailed Description

Definition at line 68 of file XMLParserLiaison.hpp.

Constructor & Destructor Documentation

◆ XMLParserLiaison()

xalanc::XMLParserLiaison::XMLParserLiaison ( )

◆ ~XMLParserLiaison()

virtual xalanc::XMLParserLiaison::~XMLParserLiaison ( )
virtual

Member Function Documentation

◆ destroyDocument()

virtual void xalanc::XMLParserLiaison::destroyDocument ( XalanDocument theDocument)
pure virtual

Destroy the supplied XalanDocument instance.

It must be an instance that was created by a previous call to parseXMLStream().

Parameters
theDocumentThe XalanDocument instance to destroy.

Implemented in xalanc::XalanSourceTreeParserLiaison, and xalanc::XercesParserLiaison.

◆ getEntityResolver()

virtual EntityResolver* xalanc::XMLParserLiaison::getEntityResolver ( ) const
pure virtual

This method returns the installed EntityResolver.

Returns
The pointer to the installed EntityResolver object.

Implemented in xalanc::XalanSourceTreeParserLiaison, and xalanc::XercesParserLiaison.

◆ getErrorHandler()

virtual ErrorHandler* xalanc::XMLParserLiaison::getErrorHandler ( ) const
pure virtual

This method returns the installed error handler.

Returns
The pointer to the installed error handler object.

Implemented in xalanc::XalanSourceTreeParserLiaison, and xalanc::XercesParserLiaison.

◆ getExecutionContext()

virtual ExecutionContext* xalanc::XMLParserLiaison::getExecutionContext ( ) const
pure virtual

Get a pointer to the current ExecutionContext instance, which may be null.

Returns
A pointer to the current ExecutionContext, if any.

Implemented in xalanc::XalanSourceTreeParserLiaison, and xalanc::XercesParserLiaison.

◆ getIndent()

virtual int xalanc::XMLParserLiaison::getIndent ( ) const
pure virtual

Get the amount to indent when indent-result="yes".

Deprecated:
Returns
number of characters to indent

Implemented in xalanc::XalanSourceTreeParserLiaison, and xalanc::XercesParserLiaison.

◆ getMemoryManager()

virtual MemoryManager& xalanc::XMLParserLiaison::getMemoryManager ( )
pure virtual

Get a reference to the current MemoryManager instance.

Returns
A pointer to the current ExecutionContext, if any.

Implemented in xalanc::XercesParserLiaison, and xalanc::XalanSourceTreeParserLiaison.

◆ getParserDescription()

virtual const XalanDOMString& xalanc::XMLParserLiaison::getParserDescription ( XalanDOMString theResult) const
pure virtual

Return a string suitable for telling the user what parser is being used.

Returns
string describing parser

Implemented in xalanc::XalanSourceTreeParserLiaison, and xalanc::XercesParserLiaison.

◆ getUseValidation()

virtual bool xalanc::XMLParserLiaison::getUseValidation ( ) const
pure virtual

Get whether or not validation will be performed.

Validation is off by default.

Returns
true to perform validation

Implemented in xalanc::XalanSourceTreeParserLiaison, and xalanc::XercesParserLiaison.

◆ getXMLEntityResolver()

virtual XMLEntityResolver* xalanc::XMLParserLiaison::getXMLEntityResolver ( ) const
pure virtual

This method returns the installed XMLEntityResolver.

Returns
The pointer to the installed XMLEntityResolver object.

Implemented in xalanc::XalanSourceTreeParserLiaison, and xalanc::XercesParserLiaison.

◆ parseXMLStream() [1/2]

virtual XalanDocument* xalanc::XMLParserLiaison::parseXMLStream ( const InputSource &  inputSource,
const XalanDOMString identifier 
)
pure virtual

Parse the text pointed at by the reader as XML, and return a DOM Document interface.

It is recommended that you pass in some sort of recognizable name, such as the filename or URI, with which the reader can be recognized if the parse fails.

The liaison owns the XalanDocument instance, and will delete it when asked (see DestroyDocument()), or when the liaison is reset, or goes out of scope.

This function is not reentrant, so you cannot call it again until the current call exits.

Parameters
readerstream that should hold valid XML
identifierused for diagnostic purposes only, some sort of identification for error reporting, default an empty string
Returns
DOM document created

Implemented in xalanc::XalanSourceTreeParserLiaison, and xalanc::XercesParserLiaison.

◆ parseXMLStream() [2/2]

virtual void xalanc::XMLParserLiaison::parseXMLStream ( const InputSource &  inputSource,
DocumentHandler &  handler,
const XalanDOMString identifier 
)
pure virtual

Parse the text pointed at by the reader as XML.

It is recommended that you pass in some sort of recognizable name, such as the filename or URI, with which the reader can be recognized if the parse fails.

This function is reentrant, so you can call it again before any other call exits. However, it is not thread-safe.

Parameters
inputSourceinput source that should hold valid XML
handlerinstance of a DocumentHandler
identifierused for diagnostic purposes only, some sort of identification for error reporting, default an empty string

Implemented in xalanc::XercesParserLiaison, and xalanc::XalanSourceTreeParserLiaison.

◆ reset()

virtual void xalanc::XMLParserLiaison::reset ( )
pure virtual

Reset the instance, freeing any XalanDocument instances created through parseXMLStream().

Implemented in xalanc::XalanSourceTreeParserLiaison, and xalanc::XercesParserLiaison.

◆ setEntityResolver()

virtual void xalanc::XMLParserLiaison::setEntityResolver ( EntityResolver *  resolver)
pure virtual

This method installs the user-specified EntityResolver on the parser.

It allows applications to trap and redirect calls to external entities.

A call to setEntityResolver with a non-null pointer will uninstall any XMLEntityResolver previously installed.

Parameters
handlerA pointer to the EntityResolver to be called when the parser encounters references to external entities.

Implemented in xalanc::XalanSourceTreeParserLiaison, and xalanc::XercesParserLiaison.

◆ setErrorHandler()

virtual void xalanc::XMLParserLiaison::setErrorHandler ( ErrorHandler *  handler)
pure virtual

This method installs the user-specified error handler.

Parameters
handlerA pointer to the error handler to be called upon error.

Implemented in xalanc::XalanSourceTreeParserLiaison, and xalanc::XercesParserLiaison.

Referenced by xalanc::XMLParserLiaison::EnsureResetErrorHandler::set().

◆ setExecutionContext()

virtual void xalanc::XMLParserLiaison::setExecutionContext ( ExecutionContext theContext)
pure virtual

Set the current ExecutionContext instance.

@parameter theContext A reference to the new ExecutionContext instance.

Implemented in xalanc::XalanSourceTreeParserLiaison, and xalanc::XercesParserLiaison.

◆ setIndent()

virtual void xalanc::XMLParserLiaison::setIndent ( int  i)
pure virtual

Set the amount to indent when indent-result="yes".

Deprecated:
Parameters
inumber of characters to indent

Implemented in xalanc::XalanSourceTreeParserLiaison, and xalanc::XercesParserLiaison.

◆ setUseValidation()

virtual void xalanc::XMLParserLiaison::setUseValidation ( bool  b)
pure virtual

If set to true, validation will be performed.

Validation is off by default.

Parameters
btrue to perform validation

Implemented in xalanc::XalanSourceTreeParserLiaison, and xalanc::XercesParserLiaison.

◆ setXMLEntityResolver()

virtual void xalanc::XMLParserLiaison::setXMLEntityResolver ( XMLEntityResolver *  resolver)
pure virtual

This method installs the user-specified XMLEntityResolver on the parser.

It allows applications to trap and redirect calls to external entities.

A call to setXMLEntityResolver with a non-null pointer will uninstall any EntityResolver previously installed.

Parameters
handlerA pointer to the entity resolver to be called when the parser encounters references to external entities.

Implemented in xalanc::XalanSourceTreeParserLiaison, and xalanc::XercesParserLiaison.


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