Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 13th, 2004, 10:30 AM
Registered User
 
Join Date: Sep 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default over writing an xml file using asp

Hello,

I am a newbie to XML as well as ASP. I am working on a project which requires that every time a particular asp page is requested, it should create / overwrite the existing xml file called "data.xml" and display the contents of "data.xml". Every time the file is displayed, the contents will be entirely different. That is I dont want to append to the file or retrieve some portion of the file, but I have to overwrite the entire xml file or overwrite all the nodes. Can anybody help me? I have no idea how to go for it.

Thanks,

Jojy
 
Old September 13th, 2004, 10:46 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Well you will need to make sure that the IIS account has permission to read/write to the relevant folder. Then you will need to do the following (pseudo code):
Code:
Instantiate msxml2.domdocument.4.0
Create xml from raw data
Use save method of DomDocument
You can then send a page to the user and to show the raw data have an iframe in the page with its source as the file you just created.

Plenty of examples if you download the ms xml 4 core services sdk from http://msdn.com/xml.





--

Joe (Co-author Beginning XML, 3rd edition)
 
Old September 14th, 2004, 08:38 AM
Registered User
 
Join Date: Sep 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you





Similar Threads
Thread Thread Starter Forum Replies Last Post
writing into xml file jerryjohn XML 1 August 18th, 2006 02:40 AM
writing to am xml file MOU Classic ASP XML 0 July 6th, 2005 07:38 AM
Reading from a xml file and writing to another billy_bob_the_3rd XML 5 April 29th, 2005 01:40 PM
Writing XML file within Loop (c#) rathbird General .NET 0 December 13th, 2004 05:26 PM
Problem writing xml file using DOM Bala XML 0 September 6th, 2003 02:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.