Please correct my terminology here if it is turned off:
5 character substitutions for XML:
- & amp; (and)
- & l; (<)
- & Gt; (>)
- "(")
- & APOS; (')
Should all these substitutions be done in the text of the element? Or just the attribute text? (terminological correction?)
eg. Is this valid XML?
<myelement>x && y</myelement> <myelement>And I quote, "no"</myelement>
> and < seem obvious for substitution in this context, but I donβt understand whether the substitution rules are global for the whole XML document or whether they apply differently to different parts of the document (for example, cdata sections apply different rules).
Assumption: this is invalid XML:
<myelement field="no & allowed here"/> <myelement field="no <> allowed here"/>
Quotations are obvious attribute separators, and <> are obvious element text separators.
source share