Re: Keeping numeric entities intact when parsing and serializing?
"Jenda Krynicky" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <[email protected]> |
From: "Nicolas Mendoza" <[email protected]> > Is there some way to keep the entities intact when parsing and serlalizing > numeric entities? > > $ perl -wle 'use XML::LibXML; my $xml_parser = XML::LibXML->new(); my $d = > $xml_parser->parse_string("<xml>Resolved: i Not resolved: > %amp;</xml>"); print $d->toString(); ' > <?xml version="1.0"?> > <xml>Resolved: i Not resolved: %amp;</xml> I think you meant &, not %amp;. There is nothing to resolve in the later. XML::Parser::Expat gives you access to the "original_string" before any entities expansion or encoding changes. Maybe you could do your thing using that module instead. Jenda ===== [email protected] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs