XML based log file - seems inefficient - can I edit a node? 
Author Message
 XML based log file - seems inefficient - can I edit a node?

I am putting together a log file in which nodes need
to be updated.  For instance:

<MyProcesses>
   <ProcessName>BusinessProcess1</ProcessName>
      <Status>Finished</Status>
   <ProcessName>BusinessProcess2</ProcessName>
      <Status>Running</Status>
</MyProcesses>

I want to update a single <Status> node. Ex: set it
from "Running" to "Finished".    Currently, I am using
serialization where I de-serialize the xml file into my class object,
change the status and serialize it back to the file.  It works,
but this seems really inefficient.  Its reading in the entire
file, making one modification, and writing the whole thing
back out.    Plus, I have multiple programs (each business process)
updating this file.

1.  Is there a better way?  Can I just open the file and in-place
edit the status and close the file? How?

2.  Whats the best way to handle file locking so that one program
doesn't overwrite another programs changes if they hit at about the
same time?

Thank you in advance!
Matt



Sat, 17 Sep 2005 03:25:29 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. hyperlinking a node in one xml file to a node in another xml file??? Best way??

2. XML copy subnodes from one node to another node in another doc

3. XML copy subnodes from one node to another node in another doc

4. Trying to append a simple XML document as a node in an XML document

5. XML: Using XPath navigation to enumerate certain xml nodes

6. Adding Nodes to TreeView and XML files

7. NTBackup, Log files, XML

8. Treeview Node.Text seems to be buggy....

9. STMAdmin.dll to query NT Log doesn't seem to work properly

10. binary log file instead of text log file

11. Cans access2.0 engine access btrieve files?

12. Remove node in a view xml

 

 
Powered by phpBB® Forum Software