Re: Keeping numeric entities intact when parsing and serializing?

Aristotle Pagaltzis <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
* Nicolas Mendoza <[email protected]> [2009-10-10 12:20]:
> So, given that we accept this, why is &amp; not converted to "'"?

You mean `&`.

It is, when parsing. But it has to be escaped for the XML to
be valid, so when generating output, it is expressed as `&amp;`.
If you write it `&#38;` in the input (which means the same `&`
character), you’ll see that the output still comes out `&amp;`
and not `&#38;`. Because it’s the same thing.

You still haven’t told us why you would want this. Are you using
software that processes XML documents, but as text blobs rather
than as XML documents? Or do you want it for legibility of the
output?

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>
_______________________________________________
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.