WWW::Sitemap::XML::Google::Image - XML Sitemap Google extension image entry
version 2.02
my $image = WWW::Sitemap::XML::Google::Image->new( { loc => 'http://mywebsite.com/image1.jpg', caption => 'Caption 1', title => 'Title 1', license => 'http://www.mozilla.org/MPL/2.0/', geo_location => 'Town, Region', }, );
XML output:
<?xml version="1.0" encoding="UTF-8"?> <image:image> <image:loc>http://mywebsite.com/image1.jpg</image:loc> <image:caption>Caption 1</image:caption> <image:title>Title 1</image:title> <image:license>http://www.mozilla.org/MPL/2.0/</image:license> <image:geo_location>Town, Region</image:geo_location> </image:image>
WWW::Sitemap::XML::Google::Image represents single image entry in sitemap file.
Class implements WWW::Sitemap::XML::Google::Image::Interface.
The URL of the image.
isa: "Location" in WWW::Sitemap::XML::Types
Required.
The caption of the image.
isa: Str
Str
Optional.
The title of the image.
The geographic location of the image.
A URL to the license of the image.
Returns XML::LibXML::Element object representing the <image:image> entry in the sitemap.
<image:image>
https://support.google.com/webmasters/answer/183668
Alex J. G. Burzyński <ajgb@cpan.org>
This software is copyright (c) 2014 by Alex J. G. Burzyński <ajgb@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WWW::Sitemap::XML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Sitemap::XML
CPAN shell
perl -MCPAN -e shell install WWW::Sitemap::XML
For more information on module installation, please visit the detailed CPAN module installation guide.