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.
XML::Sablotron::Situation::DOMHandlerDispatcher
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();
Set a handler function for the retrieveDocument callback.
$dhdisp->setRetrieveDocumentHandler(&retrieveDocument);
The handler function. It must look like this:
sub retrieveDocument( $uri, $baseUri, $sit )
Get the handler function for the retrieveDocument callback.
$handler = $dhdisp->getRetrieveDocumentHandler();
None at all.
Anselm Kruis, <a.kruis@science-computing.de>
perl.
To install XML::Sablotron, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::Sablotron
CPAN shell
perl -MCPAN -e shell install XML::Sablotron
For more information on module installation, please visit the detailed CPAN module installation guide.