Re: Keeping numeric entities intact when parsing and serializing?
"Nicolas Mendoza" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Organization | PVV |
| Message-ID | <op.u1jin2xm4q17ch@nicolasm-desktop> |
På Fri, 09 Oct 2009 17:54:39 +0200, skrev 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> > Sorry meant this: $ perl -wle 'use XML::LibXML; my $xml_parser = XML::LibXML->new(); my $d = $xml_parser->parse_string("<xml>Resolved: ' Not resolved: &</xml>"); print $d->toString(); ' <?xml version="1.0"?> <xml>Resolved: ' Not resolved: &</xml> But same problem remains. Also I can't re-escape later I'm afraid. -- Sendt med Operas revolusjonerende e-postprogram: http://www.opera.com/mail/ _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs