You are currently viewing the XML section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
xml invalid top level from ASP write XML(solution)
Thought it would be wise to log the fix here for internet searchers.
This is quite an obvious bug fix but it is annoying and took me ages.
In ASP when you response.write out XML (after setting the response.contenttype="text/xml") then it can error with the typical error of "xml invalid top level" when you try to add additional non-xml text!
Find where you write normal test out onto the screen. I found my webservice was firing back text when writing out the response in xml with some status information (not in xml format!).
I couldn't have added the status info into the xml as I was responsing the xml response from the webservice!
Im sure there's an XML guru out there who could do both like write out a sub level xml response with the status info in it! But I can;t be bothered at the mo. Bigger fish to fry! :)
Hope this helps someone!
Jesus == Way == Truth == Life == Love == God
__________________
Jesus == Way == Truth == Life == Love == God