반응형
set xmldoc = server.CreateObject("Microsoft.XMLDOM")
set objSt = server.CreateObject("ADODB.Stream")
set dbrec=server.CreateObject("ADODB.Recordset")
sql="select * from tb_member"
dbrec.Open sql, dbcon, 1
dbrec.Save objSt, adPersistXML
strXml = objSt.ReadText
'파일로 저장할경우 사용
'---------------------------------------------------------------------
strPath = "D:\bbbb.xml"
'Set objFs = Server.CreateObject("Scripting.FileSystemObject")
'Set f = objFs.CreateTextFile(strPath)
'strPath는 XML문서를 저장할 경로
'f.WriteLine "<?xml version=""1.0"" encodding=""euc-kr""?>"
'f.Write strXml
response.write "<?xml version=""1.0"" encodding=""euc-kr""?>"
Response.Write strXml
반응형