The module that will do you for today, tomorrow and many days after that for processing XML is XML::Twig. Consider:
use warnings; use strict; use XML::Twig; my $xml = <<XML; <?xml version="1.0" encoding="utf-8"?> <string xmlns="test.test.com/site/TST/">someresult</string> XML my $twig = XML::Twig->new (twig_roots => {string => \&pullString}); $twig->parse ($xml); sub pullString { my ($t, $elt) = @_; print $elt->text (), "\n" }
Prints:
someresult
In reply to Re: Help extracting text from XML data
by GrandFather
in thread Help extracting text from XML data
by perlnewb123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |