++ed by:
Nicolas Georges

NAME

XML::Tiny::Simple - a tiny helper to read XML::Tiny output and transform it to something like XML::Simple, but without dependencies.

VERSION

Version 0.01

SYNOPSIS

    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>

SUBROUTINES/METHODS

parsefile

Read xml document from the given file name. For options, see XML::Tiny's parsefile documentation.

parsestring

Same as parsefile but take a string or an opened filehandle with the XML content

traverse

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.

AUTHOR

Nicolas Georges, <xlat at cpan.org>

BUGS

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.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc XML::Tiny::Simple

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

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.




Hosting generously
sponsored by Bytemark