☻ 唐鳳 ☺ > XML-All-0.02 > XML::All

Download:
XML-All-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

XML::All - Overloaded XML objects

SYNOPSIS ^

    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 ^

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

NOTES ^

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 ^

Audrey Tang <cpan@audreyt.org>

COPYRIGHT (The "MIT" License) ^

Copyright 2006 by Audrey Tang <cpan@audreyt.org>.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is fur- nished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

syntax highlighting: