|
-
Oct 19th, 2003, 11:35 PM
#1
Thread Starter
Junior Member
Writing data to an xml file
I have an xml file which I intend to use as the database for an app. I use a dataset to load the data from the file, work on it and write data back to the file. If I edit a row, I will like to pass the datarow to a routine that identifies that row in the file using the ID field as an identifier, and write back the specific row to the file. I understand, that I can use a XMLDocument to achieve this. What I will like to know is
1. Using the XMLTextreader, can I read the file until I get to the specific node that I have edited(contained in my datarow), declare my xmlDocument object, load just that node into the document. Or will I have to load the entire file into the document before iterations?
2. Will I have to delete this node and and reinsert data from my datarow or can I edit it directly with values in my datarow?
3. If I save the docment how will my changes be reflected in the xml file? I have this nightmare scenario, where I load a fragment of the xml file, work on it , save it only to discover that the xml file has been replaced with my fragment.
4. Is there any other method that I may need to consider in trying to achieve my aim.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|