stevensun has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
I'm trying to parse an XML document. I keep getting the following error on these two records:
"Wide character in print at..."
I did some research but couldn't figure out what this means. I know it has to do with the special characters but not sure how to handle them. I'm trying to parse the info out and then print it to a textfile.
Thanks in advance!
XML: <list> <article>The Doctor’s Field Manual</article> <article>Technician’s Introduction</article> </list>
I'm using:
use XML::Twig; use XML::XPath; use XML::XPath::XMLParser; use XML::Twig::XPath; my $xpathTitle = "//article"; my @title = $twig->find_nodes ($xpathTitle); $Title = $title[0]->text(); print $Title; #this is where the error occurs
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to handle special characters in XML?
by mirod (Canon) on Mar 14, 2006 at 09:14 UTC |