Selvakumar has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
I have a problem with the below code, the entity which appears inside attribute value gets position changed while using xml::dom parser. See the below example and suggest.
use XML::DOM; my $parser = new XML::DOM::Parser(ErrorContext => 1); $text='put any xml text here'; my $doc; if (! defined(eval {$doc = $parser->parse($text)})) { my $errs = $@; die("Did not parse: $errs\n"); } $doc->normalize(); print $doc->toString;
i am getting the below output. the entity which appears inside the attribute automatically placed before the element.</ref><see-also seeref="Prothrow–Stith">
</ref>–<see-also seeref="ProthrowStith">
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML::DOM entity error
by ikegami (Patriarch) on Jun 14, 2010 at 16:02 UTC | |
|
Re: XML::DOM entity error
by almut (Canon) on Jun 14, 2010 at 15:38 UTC |