XML::Generator::PerlData

Description

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 youre 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..

Xml - Perldata - Sax2 - Somesax2handlerorfilter - Xmlgeneratorperldata - Perl - Data - Handler - Events - Style - Nested - Libraries - Programming

Published By:Kip Hampton

License Type:Freeware

Date Added:25 October, 2010

Version:0.89

Price:Free

Downloads:9

Size:13.3 KB

Platform: Linux

What people say
- required fields
     
Related Downloads

XML::Simple::Tree is a tree object extension for XML::Simple data structures.

DateSep 3, 2010

AuthorAaron Dancygier

Size7.2 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

XML::Generator::vCard is a Perl module that can generate SAX2 events for vCard 3.

DateOct 4, 2010

AuthorAaron Straup Cope

Size7.2 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

RDFStore::Parser::SiRPAC is a Perl module that implements a streaming RDF Parser as a direct implementation of XML::Parser::Expat.

DateAug 8, 2010

AuthorAlberto Reggiori

Size481.3 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

Data::Phrasebook::Loader::XML Perl module can abstract your phrases with XML. SYNOPSIS use Data::Phrasebook; my $q = Data::Phrasebook->new( class => Fnerk, loader => XML, file => phrases.

DateOct 11, 2010

AuthorBarbie

Size17.4 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

EDIReader is a Java package for parsing business documents structured according to EDI (Electronic Data Interchange) standards.

DateOct 12, 2010

AuthorBerryWorks

Size675.8 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Utilities