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

**URL:** <https://forum.kirupa.com/t/other-method-to-return-xml-to-flash-via-asp-net/290605>\
**Category:** Uncategorized\
**Created:** [June 17, 2009, 2:09am UTC](https://forum.kirupa.com/t/other-method-to-return-xml-to-flash-via-asp-net/290605 "2009-06-17T02:09:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![magicianofdark](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@magicianofdark](https://forum.kirupa.com/u/magicianofdark)\
**Post date:** [June 17, 2009, 2:09am UTC](https://forum.kirupa.com/t/other-method-to-return-xml-to-flash-via-asp-net/290605/1 "2009-06-17T02:09:38Z")

</div>

I want to send the xml data that is created at the [ASP.NET](http://ASP.NET) to flash.  
edit: [ASP.net](http://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](http://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](http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd)”\>

\<html xmlns=“[http://www.w3.org/1999/xhtml](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](http://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?
