dhtmlcombo with dynamic xml file

my source is given bellow





main.asp













<%

nrs2.Open “select * from treatment where pcode=” &"’"&npcode&"’" & “and tretdate=” &"’"&mdate&"’"& " order by id" , con,3,3

if nrs2.RecordCount=0 Then

nrs2.Close

set nrs=nothing

con.Close

set con=nothing

Response.redirect “newhead.asp”

end if

c=1

if nrs2.eof then

nrs2.MoveFirst

end if



while not nrs2.eof

mdelrow=nrs2(“dflag”)%>

        

            <% if mdelrow=“Y” Then %>

            

            <% else %>

            

            <% end if %>





            

            

        

<%

c=c+1

nrs2.MoveNext

wend

nrs2.Close

set nrs2=nothing



%>



    
<%=c%>. <%=c%>.















<%=nrs2(“doz”)%>
















here is my db2xml.asp





<% Dim objConn, strConnect, strSQL, rs, tb, mdbFile, objFSO, xmlFile, objWrite,c,cnum

cnum=request.querystring(“colname”)

xmlFile = Server.MapPath(“product.xml”)

mdbFile = Server.MapPath(“pprofile.mdb”)



tb = chr(9)



set objFSO = Server.CreateObject( “Scripting.FileSystemObject” )

Set objConn = Server.CreateObject( “ADODB.Connection” )



objConn.Open “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=” & mdbFile



objFSO.CreateTextFile( xmlFile )

set objWrite = objFSO.OpenTextFile( xmlFile, 2 )



objWrite.WriteLine("<?xml version=""1.0"" ?>")

objWrite.WriteLine("")







strSQL = “SELECT * FROM product where prdname like '”&trim(cnum)&"%’ order by prdname"

Set rs = objConn.Execute(StrSQL)

Do While not rs.EOF

c=rs(“id”)

objWrite.WriteLine(tb & “<option value=”&"’"&Cstr©&"’"&">" & rs(“prdname”) & “”)

rs.MoveNext



Loop

objWrite.WriteLine("")

objWrite.Close()



%>



its showing error messge loadxml error



and also while processing db2xml.asp its not getting ‘colname’ value



due to this its showing error



pls advice me what to do





thanks in advance





There are two things which can cause issue

a) in case of IE you need to send header
    Content-type:text/xml
b) objWrite.WriteLine("")
must be a
    objWrite.WriteLine("")