Re: XmlTextWriter Encodes HTML Entities?
- From: "clintonG" <nobody@xxxxxxxxxxx>
- Date: Tue, 29 May 2007 13:43:02 -0500
I kept following links and finally found the arcane documentation: an
XmlWriterSettings.CheckCharacters Property [1]. So it seems to me ASP.NET
developers don't have to fool around with Regular Expressions to validate
and replace text characters that would be illegal when the document is saved
as XML, i.e. RSS feeds for example.
I understand what W3C documents say but XML and HTML derive from SGML and
there are some semantic ambiguities in this context in the W3C documents.
Most of us and most documentation including W3C documentation define &
as an HTML character entity. When we get to the W3C page(s) for XML they
drop the verbiage "HTML" when describing character entities.
As I'm sure you'll have to agree reading the EBNF, the DTDs indicate we're
talking about the same thing using context specific nomenclature.
So we really don't need to quibble about semantics. All I want to do is
write code that will generate valid XML RSS feeds that will be parsed by the
greatest number of aggregators which in itself requires a personal
relationship with all the blessings of Heaven because everybody has been so
FUBAR in their respective implementations.
<%= Clinton Gallagher
[1]
http://msdn2.microsoft.com/en-us/library/system.xml.xmlwritersettings.checkcharacters(VS.80).aspx
"Martin Honnen" <mahotrash@xxxxxxxx> wrote in message
news:eqqbG%23goHHA.5052@xxxxxxxxxxxxxxxxxxxxxxx
clintonG wrote:
Thanks for confirming that the XmlTextWriter methods escapes and encodes
specific text characters as HTML character entities. The HTML character
entity naming conventions you attempt to clarify are defined by W3C
(24.4.1 The list of characters, Special characters for HTML [1]). My
question should have asked if the method escape and encode "text
characters" as HTML entities. Nitpicker ;-)
XML defines its own entities and what XmlWriter does is based on the XML
specification and _not_ on the HTML specification.
See <http://www.w3.org/TR/REC-xml/#sec-predefined-ent>.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
.
- Follow-Ups:
- Re: XmlTextWriter Encodes HTML Entities?
- From: Bjoern Hoehrmann
- Re: XmlTextWriter Encodes HTML Entities?
- References:
- XmlTextWriter Encodes HTML Entities?
- From: clintonG
- Re: XmlTextWriter Encodes HTML Entities?
- From: Martin Honnen
- Re: XmlTextWriter Encodes HTML Entities?
- From: clintonG
- Re: XmlTextWriter Encodes HTML Entities?
- From: Martin Honnen
- XmlTextWriter Encodes HTML Entities?
- Prev by Date: Re: XmlTextWriter Encodes HTML Entities?
- Next by Date: Re: XmlTextWriter Encodes HTML Entities?
- Previous by thread: Re: XmlTextWriter Encodes HTML Entities?
- Next by thread: Re: XmlTextWriter Encodes HTML Entities?
- Index(es):
Relevant Pages
|