|
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 "&" and "<" respectively. The
right angle bracket (>) may be represented using the string ">", and
MUST, for compatibility, be escaped using either ">" 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 "'",
and the double-quote character (") as """.
end cite
http://www.w3.org/TR/xml11/#dt-chardata
--
--buck
Visit wiki.midrange.com and register for an account. Edit a page that
helps you, and because it's public, you'll help someone else, too!
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.