you might want to try
<cfif isxmldoc(x.content)>
<cfset xmldata = xmlparse(x.content)>
<cfelse>
Not ValidXML
</cfif>
to see if you are getting a proper xml doc back
Main Topics
Browse All TopicsHello Experts,
I'm building a page to send XML data using (<cfhttp method="post") and expecting a reply back to the same .cfm page, the sending part if working fine, it's the receiving part that is not working. Here is my code to "wait for" and parse the reply:
<cfset x = GetHttpRequestData()>
<cfset xmldata = xmlparse(x.content)>
When I execute the .cfm page, I get the following error:
An error occured while Parsing an XML document.
Premature end of file.
Thanks,
Anthony
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
also if you are building the xml doc, make sure any place there might be special characters (& is the most common offender) use CDATA of use the replace technique as outlined here http://www.w3schools.com/x
Business Accounts
Answer for Membership
by: usachrisk1983Posted on 2007-04-05 at 06:58:08ID: 18857768
A quick search of Google shows that this is usually a misformatted XML document or one with special characters in it. Can you dump x.content, make sure it's valid, and perhaps even dump into a text file that you could look at with an XML viewer (if even just your browser) to see what's up?