× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 12/9/2015 3:05 PM, Koester, Michael wrote:
On the subject of special characters and XML, I found that the "less-than" (<) character doesn't always play nice. I have a need to send a password change to a API provided by an ISP. While not specifically excluded by their "characters not permitted" docs, I found that < does bad things in transit. So I added it to *our* list of characters not permitted, and coded an edit to deny it on input.

There are some characters that need special consideration in XML:

begin cite

The ampersand character (&) and the left angle bracket (<) MUST NOT
appear in their literal form, except when used as markup delimiters, or
within a comment, a processing instruction, or a CDATA section. 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 either "&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 or the
CDATA-section-close delimiter, "]]>". 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;".

end cite

http://www.w3.org/TR/xml11/#dt-chardata


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.