From: djc11 on
I can not get around this problem... I have tried:
<cfset model = xmlParse(#cfhttp.fileContent#)>
<cfset model = xmlParse(cfhttp.fileContent)>
<cfset model = xmlParse(ToString(cfhttp.fileContent))>
<cfset model = xmlParse(Trim(cfhttp.fileContent))>
<cfset model = xmlParse(Trim(ToString(cfhttp.fileContent)))>

All of these give me the error : 'content is not allowed in prolog'...

What is the deal??? What is the syntax for this?


From: PaulH **AdobeCommunityExpert** on
djc11 wrote:
> All of these give me the error : 'content is not allowed in prolog'...

your xml is ill formed. look at the first few lines of it.
From: djc11 on
It is the automatically generated XML from the chttp request response from
Authorize.net. For an example, if i dump cfhttp.fileContent I get:

<?xml version="1.0" encoding="utf-8"?><ARBCreateSubscriptionResponse
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><refId>dus6073</refId><messages>
<resultCode>Error</resultCode><message><code>E00012</code><text>You have
submitted a duplicate of Subscription 277440. A duplicate subscription will not
be created.</text></message></messages></ARBCreateSubscriptionResponse>

From: djc11 on
Which one of the above formats [i]should[/i] work?
From: PaulH **AdobeCommunityExpert** on
djc11 wrote:
> Which one of the above formats [i]should[/i] work?

<cfset model = xmlParse(Trim(cfhttp.fileContent))>

 |  Next  |  Last
Pages: 1 2 3 4
Prev: session variable
Next: Using cftransaction in a cfc