XML reserves certain characters, including less-than (<), greater than (>), and ampersand (&).
To express these characters in your document data, use the equivalent character entity:
less-than (<) | < |
greater than (>) | > |
ampersand (&) | & |
Here is an XML document fragment that uses character entities:
<equation> x < 2 </equation> <rhyme> Jack & Jill </rhyme>
Alternatively, data can be protected from the XML parser in a CDATA section.
Use a CDATA section to escape text that would otherwise be recognized as markup.
<comedians> <comedian> <![CDATA[Abbott & Costello]]> </comedian> <comedian> <![CDATA[Laurel & Hardy]]> </comedian> <comedian> <![CDATA[Amos & Andy]]> </comedian> </comedians>
Source:
https://studio.tellme.com/general/xmlprimer.html
No comments:
Post a Comment