|
-
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
-
Oct 19th, 2003, 11:44 PM
#2
Pretty much all of the currently available XML database solutions require you to load the whole file in order to make changes. So you might as well just use the dataset directly with the XML. Then just use the WriteXML method to save the changes.
-
Oct 19th, 2003, 11:51 PM
#3
Thread Starter
Junior Member
-
Oct 20th, 2003, 02:14 AM
#4
If you do find something I'd love to hear about it. XQuery is the closest thing I've found but it doesn't support Insert/Updates yet and there is no real tools for it yet.
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
|