NAME

PITA::XML::SAXDriver - Implements a SAX Driver for PITA::XML objects

DESCRIPTION

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.

METHODS

new

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

It takes a named param of EITHER an XML Handler object, or an Output value that is compatible with XML::SAX::Writer.

Returns a PITA::XML::SAXDriver object, or dies on error.

NamespaceURI

The NamespaceURI returns the name of the XML namespace being used in the file generation.

While PITA is still in development, this should be something like the following, where $VERSION is the PITA::XML version string.

http://ali.as/xml/schema/pita-xml/$VERSION

Prefix

The Prefix returns the name of the XML prefix being used for the output.

Handler

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.

Output

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.

SUPPORT

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.

AUTHOR

Adam Kennedy <adamk@cpan.org>, http://ali.as/

SEE ALSO

PITA::XML, PITA::XML::SAXParser

The Perl Image-based Testing Architecture (http://ali.as/pita/)

COPYRIGHT

Copyright 2005 - 2013 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.