Skip to main content
Participant
June 26, 2006
Question

XML parsing !!

  • June 26, 2006
  • 2 replies
  • 272 views
having this error and Its because the xml has some value containing "&". Aren't you allowed to have this chr??

reading my xml liike this and is crapping out at this line <CFSET MyXml = XmlParse(MyXmlCode)>

<CFFILE ACTION="READ" FILE="#MyXmlFile#" VARIABLE="MyXmlCode">
<CFSET MyXml = XmlParse(MyXmlCode)>
This topic has been closed for replies.

2 replies

June 26, 2006
um, I thought you can have & as long as its part of an entity like & but you cant have one on its own like 'Sanford & Son
Inspiring
June 26, 2006
> having this error and Its because the xml has some value containing "&". Aren't
> you allowed to have this chr??

In short: no.

Medium version: & is a "reserved symbol" in XML.

Long version: http://www.w3.org/TR/REC-xml/#syntax

--
Adam