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:

<NewDataSet>

<data>

&lt;pid&gt;S0021298J&lt;/pid&gt;

</data>

<data>

&lt;pid&gt;S0010067J&lt;/pid&gt;

</data>

<data>

&lt;pid&gt;X0001376355D&lt;/pid&gt;

</data>

<data>

&lt;pid&gt;S0089310J&lt;/pid&gt;

</data>

<data>

&lt;pid&gt;S0050681A&lt;/pid&gt;

</data>

</NewDataSet>

<!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”>

<head><title>

</title></head>

<body>

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

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

&lt;div&gt;



&lt;/div&gt;

&lt;/form&gt;

</body>

</html>

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?