XML::Sablotron::Situation::DOMHandlerDispatcher - Perl sample implementation of the Sablotron DOMHandler callback interface
use XML::Sablotron;use XML::Sablotron::Situation::DOMHandlerDispatcher;my $sit = new XML::Sablotron::Situation();$sit->regDOMHandler( new XML::Sablotron::Situation::DOMHandlerDispatcher() );my $sab = new XML::Sablotron( $sit );
The class "XML::Sablotron::Situation::DOMHandlerDispatcher" is a sample implementation of the callback methods of the Sablotron SXP DOMHandler interface.
new The constructor of the XML::Sablotron::Situation::DOMHandlerDispatcher object takes no arguments, so you can create new instance simply like this:
$dhdisp = new XML::Sablotron::Situation::DOMHandlerDispatcher();
setRetrieveDocumentHandler Set a handler function for the retrieveDocument callback.
$dhdisp->setRetrieveDocumentHandler(&retrieveDocument);
The handler function. It must look like this:
sub retrieveDocument( $uri, $baseUri, $sit )
getRetrieveDocumentHandler Get the handler function for the retrieveDocument callback.
$handler = $dhdisp->getRetrieveDocumentHandler();
EXPORT None at all. Anselm Kruis, <[email protected]> perl.