XML::Tiny::DOM - wrapper for XML::Tiny to provide a DOMmish interface


XML-Tiny-DOM documentation Contained in the XML-Tiny-DOM distribution.

Index


Code Index:

NAME

Top

XML::Tiny::DOM - wrapper for XML::Tiny to provide a DOMmish interface

DESCRIPTION

Top

This is a small simple wrapper for XML::Tiny that makes it much easier to access information in the data structures returned by XML::Tiny.

SYNOPSIS

Top

    use XML::Tiny::DOM;
    my $document = XML::Tiny::DOM->new(...);

METHODS

Top

new

This is the constructor. It takes exactly the same parameters as XML::Tiny's parsefile function, but instead of returning a naked and rather complex data structure, it returns a XML::Tiny::DOM::Element object representing the root element of the document.

There are no other methods.

LIMITATIONS

Top

This module is subject to all the limitations of XML::Tiny. However, no effort has been made to make this module work with perl versions prior to 5.6.2.

BUGS and FEEDBACK

Top

I welcome feedback about my code, including constructive criticism. Bug reports should be made using http://rt.cpan.org/ or by email, and should include the smallest possible chunk of code, along with any necessary XML data, which demonstrates the bug. Ideally, this will be in the form of a file which I can drop in to the module's test suite.

SEE ALSO

Top

XML::Tiny

XML::Tiny::DOM::Element

AUTHOR, COPYRIGHT and LICENCE

Top

CONSPIRACY

Top

This module is also free-as-in-mason software.


XML-Tiny-DOM documentation Contained in the XML-Tiny-DOM distribution.
package XML::Tiny::DOM;

use strict;
use warnings;

use vars qw($VERSION);

$VERSION = '1.1';

use XML::Tiny;
use XML::Tiny::DOM::Element;

sub new {
    shift;
    return XML::Tiny::DOM::Element->_new(XML::Tiny::parsefile(@_)->[0]);
}

'<one>zero</one>';