OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Parsing without resolving entities

On 29/10/2007, Randy McGarvey <rmcgarvey@generalcode.com> wrote:
> If I have data with character entities such as &sect; or &mdash; in the XML,
> what is the best way to keep those intact, as is, after a parse.  Are there
> any parsers that have an option not to resolve entities?  What is the best
> way you've found to deal with this issue?  Do you escape the ampersands
> (e.g. &amp;sect;) in a pre-process?  Do you address it in an entity handler
> to re-write the original entity text?  This seems like a real pain that must
> have a common solution.

It's a common question that often arises because the characters
involved cause problems downstream... in which case you're better off
trying to fix the root cause (likely to be an ecoding issue) that
rather than add pre and post processes.

Andrew Welch
Kernow: http://kernowforsaxon.sf.net/

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS