3 XML::LibXML::SAX::Builder - Building DOM trees from SAX events.
9 use XML::LibXML::SAX::Builder;
10 my $builder = XML::LibXML::SAX::Builder->new();
12 my $gen = XML::Generator::DBI->new(Handler => $builder, dbh => $dbh);
13 $gen->execute("SELECT * FROM Users");
15 my $doc = $builder->result();
20 This is a SAX handler that generates a DOM tree from SAX events. Usage is as
21 above. Input is accepted from any SAX1 or SAX2 event generator.
23 Building DOM trees from SAX events is quite easy with
24 XML::LibXML::SAX::Builder. The class is designed as a SAX2 final handler not as
27 Since SAX is strictly stream oriented, you should not expect anything to return
28 from a generator. Instead you have to ask the builder instance directly to get
29 the document built. XML::LibXML::SAX::Builder's result() function holds the
30 document generated from the last SAX stream.
45 2001-2007, AxKit.com Ltd.
47 2002-2006, Christian Glahn.
49 2006-2009, Petr Pajas.