Click here to get back home

XML::Twig

 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
XML::Twig marie 06-09-2006
Posted by marie on June 9, 2006, 6:27 pm
Please log in for more thread options


Hello, I need some help with the XML::Twig module. The XML documents
that I am working with are rather big and their processing with
XML::Twig is very slow. I would like to use 'twig_roots' or
'twig_handlers' in order to select the parts of the XML documents that
interest me.
Those parts that I want to select are some elements that have attributs
with a certain value. The value that interests me can change during
processing of the document, so at a moment I maybe have to search for
the element with id=3 and then for the element - of the same document -
with id=45 etc.
I would like to know if I could use a variable in the condition
concerning the attribute value (maybe in a regular expression?). For
instance, instead of using the string "BLA", use "$bla" or /$bla/ in
my $twig = XML::Twig->new( twig_handlers => {'attribute[@value="BLA"]'
=> \&function} );
I have already tried that but it didn't work. Thank you in advance for
your help.


Similar ThreadsPosted
XML Twig help April 8, 2005, 2:18 pm
Using XML::Twig December 19, 2005, 4:59 pm
XML::Twig June 9, 2006, 1:50 pm
XML::Twig question December 23, 2007, 2:25 pm
Help with XML::Twig xpath syntax, please October 16, 2005, 6:56 pm
XML::Twig parseurl with input Headers/XML January 16, 2005, 10:58 pm
XML::Twig::XPath - strange problem November 10, 2005, 9:44 am
XML::Twig produces double encoded UTF-8 January 4, 2007, 3:36 pm
XML::Twig constructor disregarding map_xmlns - bug in module? August 29, 2004, 1:21 pm
Problem Parsing Huge XML file using XML::Twig April 23, 2007, 10:24 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap