473,513 Members | 2,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

overwriting in xml file

7 New Member
I am doing a PHP DOM application.On basis of query some huge datas are selected and they are stored in an xml file.After doing certain calculations on this data i need to remove the existing data and replaced it with new one or is it possible to write the calculated data to another xml file.If so how can i do that.I tried many methods.But not getting worked.And this process of calculations and xml updations occur freqeuntly until some conditions in database are met.

What should i do to import calculated data to new xml file or replace it in same file.

Thanks for any help in advance.

Regards
scn87
Nov 20 '08 #1
3 4789
Dormilich
8,658 Recognized Expert Moderator Expert
if you have an xml file imported in DOMDocument you can save it to file by the save() method.

importing data to xml is similar to extracting data from xml, but without any information about that I can tell nothing.

regards
Nov 20 '08 #2
scn87
7 New Member
I have saved it using save() method for first xml file(test.xml).

The first set of data are stored in test.xml file ,i need to do some calculations upon data of test.xml using php . Now the calculated result must be stored either in same xml file(by overwriting existing data) or save to a new xml file.

How to get data from the test.xml file to store to test1.xml .

Thanks
Regards
Nov 20 '08 #3
Dormilich
8,658 Recognized Expert Moderator Expert
without any information this is hard to tell, my usual guess would be, use DOM methods to find the according node and replace the value. basicly, do the extraction steps backwards (more or less).

whether or not you overwrite or save anew your updated xml is up to you.

regards
Nov 20 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
7372
by: Ellixis | last post by:
Hello, How can I use fwrite() and fseek() in order to write data in the middle (or anywhere else) of a file without overwriting existing data ? People told me that I should load the file into...
8
3279
by: Stewart | last post by:
is there any way this can be done? I've looked at the help files and checked out as many tutorials as i could find on the net (as always) but no joy. thanks
1
1751
by: Chance Lerro | last post by:
Here's another way to PREVENT the install program for run-time Access from overwriting existing file associations: 1. Edit the Runtime MSI file with Orca, InstallShield, etc.. 2. Go to the...
9
8392
by: SStory | last post by:
I use a bitmap class new bitmap(filepath) this should and does load my jpg into memory. I then want to use mybitmap.save(filepath,imaging.imageformat.jpeg) to save it; overwriting the...
5
1835
by: Reddy | last post by:
System.Web.UI.HtmlControls.HtmlInputFile.SaveAs(FileName) is not overwriting the file. It used to work fine on IIS5.1 Recently we migrated to IIS6.0. Since then it's not working. If it's new file...
11
5500
by: Steven Jones | last post by:
I have a C program that prints out two lines as follows: Line 1 Line 2 What I would like is for this program to sleep for one second, and then print out two more lines, overwriting the...
3
8834
by: Kat | last post by:
Ok my problem with this program is that currently it isn't overwriting a dummy TXT file I have set up to test the program. At one point it did however so I know it should work but now, for some...
2
10368
by: mosscliffe | last post by:
I have a simple form with a multiline Textbox. I load the textbox with the contents of a text file. I make changes to the textbox, then I attempt to OVERWRITE the original file. I have...
6
2841
by: Frank Rizzo | last post by:
It seems that I can overwrite a .net assembly even though it is in use (in most cases). In some cases, the OS says File in use. Is there a write-up somewhere on when a .net assembly can be messed...
27
7493
by: Jason | last post by:
Hi, I need to open an existing file, seek to a position at X number of bytes, and write out Y number of bytes overwriting any existing bytes, but no erasing any other data. Is this possible? ...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7521
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5682
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1591
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.