XML
What are the invalid characters in XML??
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Puran KaushalPosted Jul 7, 2008, 7:12 AM
Hi
The characters "&" and "<" are reserved in XML as what are called "open markup delimiters" -- that is, they are the characters recognized by XML processors as indicating that what follows is markup, not data. Hence they can't be used as plain characters.
XML provides for character references, which you can use to work around this. For "<" use the reference "<" (that's "& l t ;" for those with overzealous email clients) and "&" (that's "& a m p ;") for "<" and "&" respectively.
If you'd like to read a rationale and deeper explanation for all this, take a look at http://xmlshoestring.com/xml101/wfrules.
Regards
Puran