---
name: "XML::Sablotron::SAXBuilder"
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::SAXBuilder"
---

# XML::Sablotron::SAXBuilder(3pm)

builds a Sablotron DOM document from SAX events

## NAME

XML::Sablotron::SAXBuilder -  builds a Sablotron DOM document from SAX events

## SYNOPSIS

```
 use XML::Sablotron;
 use XML::Sablotron::DOM;
 use XML::Sablotron::SAXBuilder;
 use XML::Directory;
 $dir = new XML::Directory($path);
 $builder = new XML::Sablotron::SAXBuilder;
 $doc = $dir->parse_SAX($builder);
```

## DESCRIPTION

This is a SAX handler generating a Sablotron DOM tree from SAX events. Input should be accepted from any SAX1 or SAX2 event generator. This handler implements all methods required for basic Perl SAX 2.0 handler and some of the advanced methods (that make sense for Sablotron DOM tree).

In particular, the following methods are available:

- start\_document

  - end\_document

  - start\_element

  - end\_element

  - characters

  - ignorable\_whitespace

  - processing\_instruction

  - start\_cdata

  - end\_cdata

  - comment

  Namespaces are not supported by XML::Sablotron::DOM yet, therefore SAX2 events are accepted but NS information is ignored.

## LICENSING

Copyright (c) 2001 Ginger Alliance. All rights reserved. This program is free  software; you can redistribute it and/or modify it under the same terms as  Perl itself.

## AUTHOR

Petr Cimprich, petr@gingerall.cz

## SEE ALSO

XML::Sablotron, XML::Sablotron::DOM, [*perl*(1)](/perl/1.md).
