Re: Update only Xml node (PHP5)



An XML file is like an HTML file or TXT file. Normally using the Dom
XML you cannot read and update part of an XML file directly off disk.
You must read the whole file in memory, change part of it in memory and
then you must rewrite the whole file back to disk.

However there are database engines that do this (I've read about them
but never used them). But your XML file will have a lot of extra
attributes used by the database engine.

It depends what you are doing.

jhullu@xxxxxxxxx wrote:
Hi all

can I update a xml node AND write the new value in a file witout
re-write all the file ?

sample :

my xml file :

<sample>
<exo id="1" value="Test" />
</sample>

i want to modify the file like

<sample>
<exo id="1" value="Test updated" />
</sample>

is it possible ?

.



Relevant Pages

  • Re: file system events (FileSystemWatcher)
    ... notified just as the file starts writing to disk. ... I can solve this problem by simply taking the notification, ... >For a file being editing, its content is loaded in the memory, so when user ... >this xml file, the file system knows nothing about this change. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Support of a large table
    ... >> display different parts within different controls of a vb app. ... >> One part of the XML file identifies information about processor cylces. ... >> demanding on memory. ... > Try to open it in vb with DOM first. ...
    (comp.lang.basic.visual.misc)
  • Re: Online, Offline, Disconnected applications.
    ... XML file, ... Using MSDE is the best way. ... I've looked at both the TaskVision application> and the Offline Application Block for for guidance. ... My main concern here is the scalability,> efficiency, and memory usage when the application is running. ...
    (microsoft.public.dotnet.framework.adonet)
  • How2 Flush to Disk DataSet.WriteXML(FileName,XMLWriteMode.WriteSch
    ... A user session consists of long transactions where data is ... wrong with the client machine or application the memory data is lost. ... the XML file is there. ... But if I CTL+AlT-Del and say end task from the task manager, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: remoting object access information from local xml file frequen
    ... it is efficient in using memory .. ... will it hold data in IIS memory automatically after retreiving from the ... > I would do is create a class that loads the xml file settings into the ...
    (microsoft.public.dotnet.framework.remoting)