in reply to XML processing
Seconding borisz's advice, here's some (untested) XML::Twig code to do this, in case you want to continue doing stuff with the results in perl:
It's actually pretty easy, once you know which APIs you want ;-)use XML::Twig; # ... my $twig = XML::Twig->new(); $twig->parsefile($XmlFile); my @a_elements = $twig->get_xpath("//a"); foreach my $el (@a_elements) { my $text = $el->text(); # do stuff with $text. }
Update: Changed loop variable from $a to $el when reminded by graff. Tks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: XML processing
by graff (Chancellor) on Aug 06, 2005 at 16:24 UTC | |
|
Re^2: XML processing
by shreya (Novice) on Aug 10, 2005 at 22:31 UTC | |
by mirod (Canon) on Aug 10, 2005 at 23:13 UTC | |
by shreya (Novice) on Aug 11, 2005 at 19:07 UTC | |
by runrig (Abbot) on Aug 11, 2005 at 19:11 UTC |