Linux SoftwareProgrammingLibrariesXML::Generator::PerlData 0.89

XML::Generator::PerlData 0.89


XML::Generator::PerlData is a Perl extension for generating SAX2 events from nested Perl data structures. SYNOPSIS use XML::G
Developer:   Kip Hampton
      more software by author →
Price:  0.00
License:   GPL (GNU General Public License)
File size:   13K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


XML::Generator::PerlData is a Perl extension for generating SAX2 events from nested Perl data structures.

SYNOPSIS

use XML::Generator::PerlData;
use SomeSAX2HandlerOrFilter;

## Simple style ##

# get a deeply nested Perl data structure...
my $hash_ref = $obj->getScaryNestedDataStructure();

# create an instance of a handler class to forward events to...
my $handler = SomeSAX2HandlerOrFilter->new();

# create an instance of the PerlData driver...
my $driver = XML::Generator::PerlData->new( Handler => $handler );

# generate XML from the data structure...
$driver->parse( $hash_ref );

## Or, Stream style ##

use XML::Generator::PerlData;
use SomeSAX2HandlerOrFilter;

# create an instance of a handler class to forward events to...
my $handler = SomeSAX2HandlerOrFilter->new();

# create an instance of the PerlData driver...
my $driver = XML::Generator::PerlData->new( Handler => $handler );

# start the event stream...
$driver->parse_start();

# pass the data through in chunks
# (from a database handle here)
while ( my $array_ref = $dbd_sth->fetchrow_arrayref ) {
$driver->parse_chunk( $array_ref );
}

# end the event stream...
$driver->parse_end();
and you're done...

XML::Generator::PerlData provides a simple way to generate SAX2 events from nested Perl data structures, while providing finer-grained control over the resulting document streams.
Processing comes in two flavors: Simple Style and Stream Style:

In a nutshell, 'simple style' is best used for those cases where you have a a single Perl data structure that you want to convert to XML as quickly and painlessly as possible. 'Stream style' is more useful for cases where you are receiving chunks of data (like from a DBI handle) and you want to process those chunks as they appear. See PROCESSING METHODS for more info about how each style works.

Requirements:
  • Perl
    tags xml generator  generator perldata  driver parse  perl data  stream style  simple style  data structure  nested perl  perldata new  the data  the event  new handler  handler handler  

    Download XML::Generator::PerlData 0.89


     http://mirrors.evolva.ro/CPAN/authors/id/K/KH/KHAMPTON/XML-Generator-PerlData-0.89.tar.gz


    Authors software

    Similar software

    XML::Generator::PerlData 0.89 (by Kip Hampton)
    XML::Generator::PerlData is a Perl extension for generating SAX2 events from nested Perl data structures.

    SYNOPSIS

    use XML::G

    XML::Handler::Trees 0.02 (by Eric Bohlman)
    XML::Handler::Trees is a PerlSAX handlers for building tree structures.

    SYNOPSIS

    use XML::Handler::Trees;
    use XML::Parser:

    Data::PropertyList 1998.1217 (by Evolution Online Systems, Inc.)
    Data::PropertyList is a Perl module that can convert arbitrary objects to/from strings.

    SYNOPSIS

    use Data::PropertyList qw(as

    Konstrukt::Handler 0.5 Beta 6 (by Thomas Wittek)
    Konstrukt::Handler is a base class for handlers that control the processing of the requests.

    SYNOPSIS

    use Konstrukt::Ha

    XML::Parser::Style::Stream 2.34 (by Clark Cooper)
    XML::Parser::Style::Stream is a Stream style for XML::Parser.

    SYNOPSIS

    use XML::Parser;
    my $p = XML::Parser->new(Style =>

    Tree::Simple::SAX 0.01 (by Stevan Little)
    Tree::Simple::SAX is a set of classes for using Tree::Simple with XML.

    SYNOPSIS

    use Tree::Simple::SAX;
    use XML::SAX::Parse

    Video::Xine 0.02 (by Stephen Nelson)
    Video::Xine is a Perl interface to libxine.

    SYNOPSIS

    use Video::Xine;

    # Create and initialize the Xine object
    my $xin

    AxKit2::XSP::SimpleTaglib 1.1 (by J?rg Walter)
    AxKit2::XSP::SimpleTaglib is an alternate XSP taglib helper.

    SYNOPSIS

    package Your::XSP::Package;
    use AxKit2::XSP::Sim

    ACPID 1.0.4 (by Tim Hockin)
    ACPID used to try to handle events internally

    Data::DPath::Builder 0.00_01 (by Ken MacLeod)
    Data::DPath::Builder is a SAX handler for building an XPath tree.

    SYNOPSIS

    use AnySAXParser;
    use Data::DPath::Builder;

    $


    Other software in this category

    zlib 1.2.3 (by Jean-loup Gailly)
    zlib is designed to be a free, general-purpose, legally unencumbered, lossless data-compression library for use on virtually any comp

    libjpeg v6b (by Independent JPEG Group)
    libjpeg is a library for handling the JPEG (JFIF) image format

    OpenSSL 0.9.7c (by The OpenSSL Project Team)
    The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implement

    libxml2 2.6.27 (by DV)
    Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), libxml2 library i

    GNU C library 2.4 (by Andreas Jaeger)
    GNU C library (glibc) is one of the most important components of GNU Hurd and most modern Linux distributions.

    GNU C library is us

  •     search


    Featured Software

    jEdit 4.3 pre8
    jEdit is an Open Source text editor written in Java

    Opera 9.02
    Surf the Internet in a safer, faster, and easier way with Opera browser

    GNU Aspell 0.60.4
    GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


    Subscribe in Rojo
    Google Reader
    Add to My Yahoo!

    Add to My AOL
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    Add 'nixbit linux software' to Newsburst from CNET News.com
    del.icio.us nixbit linux software


    Top tags