Other method to return xml to flash via ASP.NET?

I want to send the xml data that is created at the ASP.NET to flash.
edit: ASP.net gets data from sql server and place inside a dataset

But whenever i used “response.write(dataset.writexml)”,
I would get Error 1088. markup is not well formed.

when i placed a “trace(event.target.data)” to see what data returned to flash,
it shows that i got back not just the xml data, but some html codes, which i have no idea where it belongs(ASP.NET? flash?). At the end there’s also an error message.

This is what i got:


















<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

<html xmlns=“http://www.w3.org/1999/xhtml”>




&lt;form name="form1" method="post" action="db.aspx" id="form1"&gt;

<input type=“hidden” name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE2MTY2ODcyMjlkZNBiBs1lnNE4csQgvobiiSymFCDL" />






TypeError: Error #1009: Cannot access a property or method of a null object reference.
at news_fla::MainTimeline/loaded()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()

Unlike most other people, i don’t wish to create the an .xml file on the server.
thats why all i did was to send the xml data to flash and display.

Someone suggested to me that maybe i have to make a delimiter to pull out the xml data.

but i’m new to flash and that would waste a lot of time.

Is there some other method?