# Help! Flash error: 1088 (Markup in doucment not well-formed)

**URL:** <https://forum.kirupa.com/t/help-flash-error-1088-markup-in-doucment-not-well-formed/290520>\
**Category:** programming\
**Created:** [June 16, 2009, 3:28am UTC](https://forum.kirupa.com/t/help-flash-error-1088-markup-in-doucment-not-well-formed/290520 "2009-06-16T03:28:44Z")\
**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 16, 2009, 3:28am UTC](https://forum.kirupa.com/t/help-flash-error-1088-markup-in-doucment-not-well-formed/290520/1 "2009-06-16T03:28:44Z")

</div>

I’m trying to use [ASP.NET](http://ASP.NET) to retrieve data from the sql server, place in inside an xml and sends the xml to flash to display the data.

I’m getting  
TypeError: Error #1088: The markup in the document following the root element must be well-formed.  
at news\_fla::mainTimeline/loaded()  
at flash.events::EventDispatcher/dispatchEventFunction()  
at flash.events::EventDispatcher/dispatchEvent()  
at [flash.net](http://flash.net)::URLLoader/onComplete()

This is my code:

# [ASP.NET](http://ASP.NET)

```
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    Dim adapter As SqlDataAdapter
    Dim ds As New DataSet
    Dim sql As String

    Dim con As New SqlConnection("data source = GN80000798-0\SQLEXPRESS2008; initial catalog = EL; integrated security = true")
    sql = "select * from news"
    Try
        con.Open()
        adapter = New SqlDataAdapter(sql, con)
        adapter.Fill(ds, "data")
        con.Close()

        Response.ContentType = "text/XML"
        Response.HeaderEncoding = Encoding.UTF8
        ds.WriteXml(Response.OutputStream, XmlWriteMode.WriteSchema)

        MsgBox("Done")
    Catch ex As Exception
        MsgBox(ex.ToString)
    End Try

End Sub

```

# Flash

import flash.xml.\*;

var newsrequest:URLRequest = new URLRequest(“[http://localhost:1179/DB/DB.aspx](http://localhost:1179/DB/DB.aspx)”); [//ASP.NET](https://ASP.NET) development server  
var newsloader:URLLoader = new URLLoader();  
var newsxml:XML;  
var dvar:URLVariables = new URLVariables();  
dvar.dummy = “dummy”;  
newsrequest.data = dvar;  
newsrequest.method = URLRequestMethod.POST;  
newsloader.load(newsrequest);

newsloader.addEventListener(Event.COMPLETE, loaded);

titlenews.autoSize = TextFieldAutoSize.LEFT;  
bodynews.autoSize = TextFieldAutoSize.LEFT;

function loaded(event:Event){  
newsxml = new XML(event.target.data);  
newsxml.ignoreWhitespace = true;  
trace(newsxml);  
}

HOWEVER, if i replace the  
“ds.WriteXml(Response.OutputStream, XmlWriteMode.WriteSchema)”  
with  
"ds.WriteXml(“C:  
ew.xml”)  
it works. but the request for data varies (modifying sql statement in near future) and i don’t wish to create a new .xml for each of it.

Please tell me whats wrong with this…  
or is there a better method?
