Click here to get back home

New module XML::Traverse::ParseTree

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
New module XML::Traverse::ParseTree Martin Busik 10-23-2006
Posted by Martin Busik on October 23, 2006, 5:57 pm
Please log in for more thread options


Hello,
I'm happy to announce a new module XML::Traverse::ParseTree (v 0.02)

This module aims to simplify the access to the contents of a xml
document. When DOM-approach is the one and a SAX-parser-approach
the other extreme, then XML::Traverse::ParseTree strikes a balance between
them.

Parsing has to be done by means of XML::Parser, XML::Traverse::ParseTree
delivers getters and iterators. Access paths are specified in a xpath-like
syntax.

E.g.:
my $xml = XML::Parser->new(Style => "Tree")->parse($xmlcont);
my $h = XML::Traverse::ParseTree->new();

my $a1 = $h->get($xml,'document','structure','sections');
my $i = $h->get($a1,'section[*]','item[*]');
while (my $e = $i->()) {
...
$attr = $h->get($e,'another-child-element','@attribute-name');
$text = $h->get($e,'#TEXT');
}


You can download this package from CPAN:

http://search.cpan.org/~mbusik/XML-Traverse-ParseTree-0.02/

Feedback will be appreciated.

Cheers,
Martin



Similar ThreadsPosted
Traverse a directory July 13, 2006, 2:10 pm
Lower case module name for non-pragma module January 4, 2005, 10:19 am
RFC: New module 'Module::Bundled::Files' August 26, 2005, 3:49 pm
help with an MD5.pm module!! September 3, 2005, 11:39 pm
Looking for RTP module December 9, 2004, 9:17 pm
module for FFT May 9, 2005, 3:06 pm
Module may not be right one? April 27, 2006, 12:57 pm
The 'if' module June 1, 2006, 8:18 pm
The 'if' module June 1, 2006, 8:26 pm
use module March 3, 2007, 5:13 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap