XML::All - Overloaded XML objects


XML-All documentation  | view source Contained in the XML-All distribution.

Index


NAME

Top

XML::All - Overloaded XML objects

SYNOPSIS

Top

    use XML::All;
     
    my $xml = < <a href='/'>1 <b>2</b> <em>3</em></a> >;
     
    print $$xml;            # a
    print join ", ", @$xml; # 1, <b>2</b>, <em>3</em>
    print join ", ", %$xml; # href, '/'
     
    print $xml->b();        # <b>2</b>
    print $xml->b() * 10;   # 20
    print $xml->();         # 1
     
    $$xml = 'link';
    print $xml;             # <link href='/'>...</link>
     
    my $em = $xml->em + <hr/>;
    print $em;              # <em>3<hr/></em>

    $xml -= <em/>;
    print $xml;             # <link href='/'>1 <b>2/b> </link>

    $xml->( b => sub { $$_ = 'em' } );
    print $xml;             # <link href='/'>1 <em>2/em> </link>

DESCRIPTION

Top

This module provides a handy wrapper around XML::Twig and XML::Literal to provide easy accessors to the XML structures.

NOTES

Top

This is a preview release; all APIs are subject to change, and stream processing mode is not yet in place.

Please be patient and don't depend on this module for your production code just now. :)

AUTHORS

Top

Audrey Tang <cpan@audreyt.org>

COPYRIGHT (The "MIT" License)

Top


XML-All documentation  | view source Contained in the XML-All distribution.