473,587 Members | 2,321 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 4797
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
7377
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 memory (a variable) and use concatenation. But, according to me, It isn't clean to load an entire file into
8
3285
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
1756
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 InstallExecuteSequence table 3. find the following entries and set them to false: RegisterExtensionInfo
9
8407
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 original. If this outfile path is different there is no problem but when it is the same file it blows up with a generic GDI+error.
5
1848
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 it works fine. For the same file getting the error "Access to the path "" denied. I gave fullcontorl to ASPNET user on the folder. Please help...
11
5508
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 previous two. The sleeping bit is trivial but, what about the overwriting? I am assuming that the output will be displayed on a standard terminal...
3
8839
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 reason, it won't. I'm using Visual C++ 6.0(yes I know, my school is upgrading next year) and this program compiles and runs without error(minus the...
2
10371
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 tried opening with FilMode.Create, FileMode.Truncate but they bothh APPEND to the file.
6
2848
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 with (e.g. overwritten, renamed, deleted, etc...). Regards
27
7513
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? I've opened a file in append "a" mode, and then used fseek with SEEK_SET to seek to 0 bytes into the file, but this sets the position at the end of...
0
7918
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7843
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6621
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5713
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2353
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 we have to send another system
0
1185
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.