XML::Grammar::ProductsSyndication - an XML Grammar for ProductsSyndication.
Version 0.0403
use XML::Grammar::ProductsSyndication; my $synd = XML::Grammar::ProductsSyndication->new( { 'source' => { 'file' => "products.xml", }, } ); # A LibXML compatible XHTML DOM my $xhtml = $synd->transform_into_html({ 'output' => "xml" }); # Not implemented yet! $synd->download_preview_images( { 'dir' => "mydir/", } );
The constructor - accepts a single hash reference with the following keys:
A reference to a hash that contains the information for the source XML for the file. Currently supported is a 'file' key that contains a path to the file.
'file'
Points to the data directory where the DTD files, the XSLT stylesheet, etc. are stored. Should not be generally over-ridden.
Checks if the filename validates according to the DTD.
Transforms the output into HTML, and returns the results. If 'output' is 'xml' returns the XML::LibXML XML DOM. If 'output' is 'string' returns the XML as a monolithic string. Other 'output' formats are undefined.
'output'
'xml'
'string'
Updates the cover images from Amazon. Receives one hash ref being the arguments. Valid keys are:
size
The request size of the image - 's', 'm', 'l',
's'
'm'
'l'
resize_to
An optional hash ref containing width and height maximal dimensions of the image to clip to.
name_cb
A callback to determine the fully qualified path of the file. Receives the following information:
xml_node
id
isbn
amazon_token
An Amazon.com web services token. See XML::Amazon.
amazon_associate
An optional Amazon.com associate ID. See XML::Amazon.
amazon_sak
An optional Amazon.com Secret Access Key (sak). See XML::Amazon.
overwrite
If true, instructs to overwrite the files in case they exist.
Shlomi Fish, <shlomif at cpan.org>
<shlomif at cpan.org>
Please report any bugs or feature requests to bug-xml-grammar-productssyndication at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=XML::Grammar::ProductsSyndication. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-xml-grammar-productssyndication at rt.cpan.org
Automatically Download Preview Images from Amazon.com
You can find documentation for this module with the perldoc command.
perldoc XML::Grammar::ProductsSyndication
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/XML::Grammar::ProductsSyndication
CPAN Ratings
http://cpanratings.perl.org/d/XML::Grammar::ProductsSyndication
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=XML::Grammar::ProductsSyndication
Search CPAN
http://search.cpan.org/dist/XML::Grammar::ProductsSyndication
* http://www.zvon.org/ for their excellent XSLT Tutorial.
* http://search.cpan.org/~pajas/ for squashing some XML::LibXML bugs I reported to him.
Trace the progress of the Amazon.com progress.
More XSLT customisation.
Generate a table-of-contents.
Copyright 2006 Shlomi Fish, all rights reserved.
This program is released under the following license: MIT X11.
To install XML::Grammar::ProductsSyndication, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::Grammar::ProductsSyndication
CPAN shell
perl -MCPAN -e shell install XML::Grammar::ProductsSyndication
For more information on module installation, please visit the detailed CPAN module installation guide.