---
name: "XML::Sablotron::Situation::DOMHandlerDispatcher"
section: "3pm"
platform: "linux"
package: "libxml-sablot-perl"
version: "1.0-2+b1"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/XML::Sablotron::Situation::DOMHandlerDispatcher"
---

# XML::Sablotron::Situation::DOMHandlerDispatcher(3pm)

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, \<a.kruis@science-computing.de\> perl.
