XML::Tiny::Simple - a tiny helper to read XML::Tiny output and transform it to something like XML::Simple, but without dependencies.
Version 0.01
use XML::Tiny::Simple qw(parsestring); my $doc = parsestring( *DATA ); $doc->{root}->{branch}->{second}->{leaf}->[0]->{flower}; # "false" $doc->{root}->{branch}->{second}->{leaf}->[0]->{content}; #"a dead leaf" $doc->{root}->{branch}->{first}->{name}; "first" $doc->{root}->{branch}->{first}->{tag}; "branch" __DATA__ <?xml version="1.0" encoding="utf-8" ?> <root> <branch name="first"/> <branch name="second"> <leaf flower="false">a dead leaf</leaf> <leaf flower="true">another leaf</leaf> </branch> </root>
Read xml document from the given file name. For options, see XML::Tiny's parsefile documentation.
Same as parsefile but take a string or an opened filehandle with the XML content
Take a document or sub-element in the XML::Tiny format, and an optional parent node. It will return the document in the XML::Tiny::Simple format.
Nicolas Georges, <xlat at cpan.org>
<xlat at cpan.org>
Please report any bugs or feature requests to bug-xml-tiny-simple at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=XML-Tiny-Simple. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-xml-tiny-simple at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc XML::Tiny::Simple
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=XML-Tiny-Simple
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/XML-Tiny-Simple
CPAN Ratings
http://cpanratings.perl.org/d/XML-Tiny-Simple
Search CPAN
http://search.cpan.org/dist/XML-Tiny-Simple/
Copyright 2012 Nicolas Georges.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install XML::Tiny::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::Tiny::Simple
CPAN shell
perl -MCPAN -e shell install XML::Tiny::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.