Question

Using CFXML, I'm getting this error:

An error occured while Parsing an XML document. The entity name must immediately follow the '&' in the entity reference.

The dump shows ampersands used like this:

thing-&-things

Here's the code:

<cfxml variable="xml">
    <cfoutput>
        <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
            #xml#
        </urlset>
    </cfoutput>
</cfxml>

Why doesn't CFXML like this format for ampersands, and what format should they be in?

Était-ce utile?

La solution

Use xmlFormat() around the data and it should fix your issue.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top