anniyan has asked for the wisdom of the Perl Monks concerning the following question:
Monks when i am using the below code to run the xml file, i am getting the error due to entity though the file is well formed. How can i get rid off this.
use strict; use XML::Twig; my $twig = new XML::Twig( twig_handlers => { sec => sub { $_->set_gi('section') }, #change the element }, keep_encoding => 1, keep_spaces => 1, pretty_print => 'indented' #pr +int format ); $twig->parsefile('1.xml');
1.xml ----- <stats> <sec id="1.1">testing</sec> <sec id="1.2">“testing”</sec> </stats>
Regards,
Anniyan
(CREATED in HELL by DEVIL to s|EVILS|GOODS|g in WORLD)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Xml::Twig Question
by MonkE (Hermit) on May 11, 2006 at 13:34 UTC | |
|
Re: Xml::Twig Question
by gopalr (Priest) on May 12, 2006 at 04:21 UTC |