Domanda

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?

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top