March 1, 2004 at 1:41 am
i know how to write a recordset to an XML file,
but how do i edit tht xml file
suppose here is an xml file
now here in this i want to edit the second "SQL Queries" in title
the publishers name from "Hema" to "Viman"
and save the same xml file how do i do tht
how do i do tht
i mean to say edit a particulare record in xml and then save it.
*Sigh*
Click Here To Close Thread, Administrators
<a href="http://www.websolsoftware.com"> For IT jobs click here</a>
*Sukhoi*[font="Arial Narrow"][/font]
March 2, 2004 at 7:59 am
After you persist your recordset to xml:
RS.Save "myRS.xml", adPersistXML
You can then load that xml file into a DomDocument and re-open it in another recordset:
Set oXml = Server.CreateObject("MSXML2.DomDocument.4")
Set RS = Server.CreateObject("ADODB.Recordset")
oXml.Load("myRS.xml")
RS.Open oXml
That opens it in firehose mode but you can set it to add a new row or update a row. To select particular row you'll need to use the Filter method of the recordset object. After you've done your editing/updating just persist the file like you did originally to get a new snapshot of your changes.
Regards,
Eric
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply