Linux SoftwareProgrammingLibrariesXML::Parser::EasyTree 0.01

XML::Parser::EasyTree 0.01


XML::Parser::EasyTree is an easier tree style for XML::Parser. SYNOPSIS use XML::Parser; use XML::Parser::EasyTree; $XM
Developer:   Eric Bohlman
      more software by author →
Price:  0.00
License:   Perl Artistic License
File size:   3K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


XML::Parser::EasyTree is an easier tree style for XML::Parser.

SYNOPSIS

use XML::Parser;
use XML::Parser::EasyTree;
$XML::Parser::Easytree::Noempty=1;
my $p=new XML::Parser(Style=>'EasyTree');
my $tree=$p->parsefile('something.xml');

XML::Parser::EasyTree adds a new "built-in" style called "EasyTree" to XML::Parser. Like XML::Parser's "Tree" style, setting this style causes the parser to build a lightweight tree structure representing the XML document. This structure is, at least in this author's opinion, easier to work with than the one created by the built-in style.
When the parser is invoked with the EasyTree style, it returns a reference to an array of tree nodes, each of which is a hash reference.

All nodes have a 'type' key whose value is the type of the node: 'e' for element nodes, 't' for text nodes, and 'p' for processing instruction nodes. All nodes also have a 'content' key whose value is a reference to an array holding the element's child nodes for element nodes, the string value for text nodes, and the data value for processing instruction nodes. Element nodes also have an 'attrib' key whose value is a reference to a hash of attribute names and values. Processing instructions also have a 'target' key whose value is the PI's target.

EasyTree nodes are ordinary Perl hashes and are not objects. Contiguous runs of text are always returned in a single node.

The reason the parser returns an array reference rather than the root element's node is that an XML document can legally contain processing instructions outside the root element (the xml-stylesheet PI is commonly used this way).

If the parser's Namespaces option is set, element and attribute names will be prefixed with their (possibly empty) namespace URI enclosed in curly brackets.

Requirements:
  • Perl
    tags xml parser  the parser  key whose  parser easytree  whose value  also have  element nodes  tree style  nodes also  instruction nodes  value for  attribute names  root element  

    Download XML::Parser::EasyTree 0.01


     http://mirrors.evolva.ro/CPAN/authors/id/E/EB/EBOHLMAN/XML-Parser-EasyTree-0.01.tar.gz


    Authors software

    XML::Parser::EasyTree 0.01 (by Eric Bohlman)
    XML::Parser::EasyTree is an easier tree style for XML::Parser.

    SYNOPSIS

    use XML::Parser;
    use XML::Parser::EasyTree;
    $XM

    XML::Handler::Trees 0.02 (by Eric Bohlman)
    XML::Handler::Trees is a PerlSAX handlers for building tree structures.

    SYNOPSIS

    use XML::Handler::Trees;
    use XML::Parser:

    XML::TiePYX 0.05 (by Eric Bohlman)
    XML::TiePYX is a Perl module to read or write XML data in PYX format via tied filehandle

    SYNOPSIS

    use XML::TiePYX;

    tie *

    XML::Records 0.12 (by Eric Bohlman)
    XML::Records is a Perl module for perlish record-oriented interface to XML.

    SYNOPSIS

    use XML::Records;
    my $p=XML::Records-


    Similar software

    XML::Parser::EasyTree 0.01 (by Eric Bohlman)
    XML::Parser::EasyTree is an easier tree style for XML::Parser.

    SYNOPSIS

    use XML::Parser;
    use XML::Parser::EasyTree;
    $XM

    XML::DOM 1.44 (by T.J. Mather)
    XML::DOM is a perl module for building DOM Level 1 compliant document structures.

    SYNOPSIS

    use XML::DOM;

    my $parser = new

    XML::Handler::Trees 0.02 (by Eric Bohlman)
    XML::Handler::Trees is a PerlSAX handlers for building tree structures.

    SYNOPSIS

    use XML::Handler::Trees;
    use XML::Parser:

    XML::Parser::Style::Stream 2.34 (by Clark Cooper)
    XML::Parser::Style::Stream is a Stream style for XML::Parser.

    SYNOPSIS

    use XML::Parser;
    my $p = XML::Parser->new(Style =>

    XML::DOM::Attr 1.44 (by XML::DOM::Attr Team)
    XML::DOM::Attr is an XML attribute in XML::DOM.

    XML::DOM::Attr extends XML::DOM::Node.

    The Attr nodes built by the XML::DOM::Pa

    XML::SimpleObject 0.53 (by Dan Brian)
    XML::SimpleObject is a Perl extension allowing a simple object representation of a parsed XML::Parser tree.

    SYNOPSIS

    use XML:

    XML::DOM::Element 1.44 (by T.J. Mather)
    XML::DOM::Element is an XML element node in XML::DOM.

    XML::DOM::Element extends XML::DOM::Node.

    By far the vast majority of obj

    XML::DOM::Lite 0.10 (by Richard Hundt)
    XML::DOM::Lite is a Lite Pure Perl XML DOM Parser Kit.

    SYNOPSIS

    # Parser
    use XML::DOM::Lite qw(Parser :constants);

    $pa

    XML::DOM::Document 1.44 (by XML::DOM Team)
    XML::DOM::Document is an XML document node in XML::DOM.

    XML::DOM::Document extends XML::DOM::Node.

    It is the main root of the X

    XML::Filter::DOMFilter::LibXML 0.02 (by Petr Pajas)
    XML::Filter::DOMFilter::LibXML is a SAX Filter allowing DOM processing of selected subtrees.

    SYNOPSIS

    use XML::LibXML;
    use


    Other software in this category

    zlib 1.2.3 (by Jean-loup Gailly)
    zlib is designed to be a free, general-purpose, legally unencumbered, lossless data-compression library for use on virtually any comp

    libjpeg v6b (by Independent JPEG Group)
    libjpeg is a library for handling the JPEG (JFIF) image format

    OpenSSL 0.9.7c (by The OpenSSL Project Team)
    The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implement

    libxml2 2.6.27 (by DV)
    Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), libxml2 library i

    GNU C library 2.4 (by Andreas Jaeger)
    GNU C library (glibc) is one of the most important components of GNU Hurd and most modern Linux distributions.

    GNU C library is us

  •     search


    Featured Software

    jEdit 4.3 pre8
    jEdit is an Open Source text editor written in Java

    Opera 9.02
    Surf the Internet in a safer, faster, and easier way with Opera browser

    GNU Aspell 0.60.4
    GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


    Subscribe in Rojo
    Google Reader
    Add to My Yahoo!

    Add to My AOL
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    Add 'nixbit linux software' to Newsburst from CNET News.com
    del.icio.us nixbit linux software


    Top tags