Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
| Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 9th, 2006, 03:56 AM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to g000we Send a message via Yahoo to g000we
Default 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.ArgumentException: Invalid Xml salloo XSLT 2 July 25th, 2007 04:43 AM
How to get data from top level elements hubba09 XSLT 1 July 6th, 2007 07:49 AM
XML broken after over write hamilton XML 2 January 8th, 2007 11:30 AM
XML Write to a string dkb XML 0 December 16th, 2003 12:38 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.