:: Forum >>
ASP Recordset Save xml example? v2.0
I am using this code:
rstData.Open strSQL, DataConn, adOpenForwardOnly, adLockReadOnly, adCmdText
Dim objXMLDOM, schemaNode
Set objXMLDOM = CreateObject("Microsoft.xmldom")
rstData.Save objXMLDOM, adPersistXML
With objXMLDOM
.setProperty "SelectionNamespaces", _
"xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'"
Set schemaNode = .selectSingleNode("//s:Schema")
With .documentElement
.removeChild schemaNode
.removeAttribute "xmlns:s"
.removeAttribute "xmlns:dt"
.removeAttribute "xmlns:rs"
End With
.Save Server.MapPath("z.xml")
End With
rstData.Close
but the xml comes out looking like this:
<xml xmlns:z="#RowsetSchema">
<rs:data xmlns:rs="urn:schemas-microsoft-com:rowset">
<z:row ROW="["5028/35","Mentor-Protege Program",", ","3","comet","599","106940","N04-MN-308","Sep 30 2003 12:00AM","May 30 2006 12:00AM","TM","420159.00","420159.00","0.00","0.00","0","10/11/2005","0","Sep 8 2005 12:00AM","auto-inserted from certified EAC"],"/>
<z:row ROW="["5028/36","JWFC IT Systems Engineering Support",", ","","","599","100718","N04-CN-170","Mar 12 2003 12:00AM","Oct 31 2003 12:00AM","CPFF FPH","134876.00","134876.00","0.00","0.00","0","","0","",""],"/>
any ideas how to format the XML to make it work??
I realize I could use a data island, but I think you have to parse the entire recordset in order to do that. This method creates an xml file or a stream in memory.
What I would really like to see is an example creating the stream in memory and using it to create a grid.
Any Ideas??
Jim Shaffer
Wednesday, October 19, 2005
This topic is archived.
Back to support forum
Forum search