Re: Keeping numeric entities intact when parsing and serializing?

Petr Pajas <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
2009/10/9 Nicolas Mendoza <[email protected]>:
> On Fri, 09 Oct 2009 22:51:32 +0200, Aristotle Pagaltzis <[email protected]>
> wrote:
>
>> * Nicolas Mendoza <[email protected]> [2009-10-09 17:55]:
>>> Is there some way to keep the entities intact when parsing and
>>> serlalizing numeric entities?
>>
>> Why would you want such a thing?
>>
>
> Because I'm feeding it data and I want it to come out the same way? Just
> like &amp; does. (I want to distinguish an incoming &#39; and "'". So I
> don't want it to alter my valid XML data, basically.)
>
> Actually it's a bit surprising that libxml2 does that.

Huh? There is absolutly nothing surprising about that, it is an XML
parser? Programming XML would be hell if XML parsers didn't do this.
>From the XML point of view, &#39; and ' are the same thing! Read the
XML spec.

To be fair, there are few cases when particular formatting matters,
but those are (supposed to be) dealt with by XML C14N (and possibly
XML Encryption and XML Signature).

-- Petr
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.