PITA::XML::SAXDriver - Implements a SAX Driver for PITA::XML objects
Although you won't need to use it directly, this class provides a "SAX Driver" class that converts a PITA::XML object into a stream of SAX events (which will mostly likely be written to a file).
Please note that this class is incomplete at this time. Although you can create objects, you can't actually run them yet.
# Create a SAX Driver to generate in-memory $driver = PITA::XML::SAXDriver->new(); # ... or to stream (write) to a file $driver = PITA::XML::SAXDriver->new( Output => 'filename' ); # ... or to send the events to a custom handler $driver = PITA::XML::SAXDriver->new( Handler => $handler );
The new constructor creates a new SAX generator for PITA-XML files.
new
It takes a named param of EITHER an XML Handler object, or an Output value that is compatible with XML::SAX::Writer.
Output
Returns a PITA::XML::SAXDriver object, or dies on error.
PITA::XML::SAXDriver
The NamespaceURI returns the name of the XML namespace being used in the file generation.
NamespaceURI
While PITA is still in development, this should be something like the following, where $VERSION is the PITA::XML version string.
$VERSION
http://ali.as/xml/schema/pita-xml/$VERSION
The Prefix returns the name of the XML prefix being used for the output.
Prefix
The Handler returns the SAX Handler object that the SAX events are being sent to. This will be or the SAX Handler object you originally passed in, or a XML::SAX::Writer object pointing at your Output value.
Handler
If you did not provide a custom SAX Handler, the Output accessor returns the location you are writing the XML output to.
If you did not provide a Handler or Output param to the constructor, then this returns a SCALAR reference containing the XML as a string.
SCALAR
Bugs should be reported via the CPAN bug tracker at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=PITA-XML
For other issues, contact the author.
Adam Kennedy <adamk@cpan.org>, http://ali.as/
PITA::XML, PITA::XML::SAXParser
The Perl Image-based Testing Architecture (http://ali.as/pita/)
Copyright 2005 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
To install PITA::XML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PITA::XML
CPAN shell
perl -MCPAN -e shell install PITA::XML
For more information on module installation, please visit the detailed CPAN module installation guide.