on 6/26/06 5:22 PM, John Balestrieri at [EMAIL PROTECTED] wrote:

> I've fixed the crashes, it was an encoding problem (I was converting
> incorrectly). But, I'm still curious about what is legal text and
> what is not. I've noticed that '&' is converted by the XML classes to
> & when writing XML -- so it is it valid to write non-ASCII in the
> XML document if the XML classes are accepting it?

You might check out the Annotated XML Specification (
http://www.xml.com/axml/testaxml.htm).

Basically an XML document can contain tab, carriage return, line feed and
legal graphic characters from Unicode  and ISO/IEC 10646.

Here's the section on the characters that need to be encoded:

The ampersand character (&) and the left angle bracket (<) may appear in
their literal form only when used as markup delimiters, or within a comment,
a processing instruction, or a CDATA section. They are also legal within the
literal entity value of an internal entity declaration; see "4.3.2
Well-Formed Parsed Entities". If they are needed elsewhere, they must be
escaped using either numeric character references or the strings "&amp;" and
"&lt;" respectively. The right angle bracket (>) may be represented using
the string "&gt;", and must, for compatibility, be escaped using "&gt;" or a
character reference when it appears in the string "]]>" in content, when
that string is not marking the end of a CDATA section.

In the content of elements, character data is any string of characters which
does not contain the start-delimiter of any markup. In a CDATA section,
character data is any string of characters not including the
CDATA-section-close delimiter, "]]>".

To allow attribute values to contain both single and double quotes, the
apostrophe or single-quote character (') may be represented as "&apos;", and
the double-quote character (") as "&quot;".

Chris


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to