473,386 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Using XML file as Storage

My WinForms app store some kind of data in a structured way... don't need a
database to store that, so I was thinking about store this in a XML file...
I would like to know what's the best method to read/write XML files...
In preview, I'm using DataSets and ReadXml/WriteXml methods... I don't know
if it's the best way.... I know a lot of classes in the System.Xml
Namespace, but I don't know wich of them fits on my needs (simply read/write
sequential data)...
Nov 11 '05 #1
1 1671
Rafael Veronezi wrote:
My WinForms app store some kind of data in a structured way... don't need a
database to store that, so I was thinking about store this in a XML file...
I would like to know what's the best method to read/write XML files...
In preview, I'm using DataSets and ReadXml/WriteXml methods... I don't know
if it's the best way.... I know a lot of classes in the System.Xml
Namespace, but I don't know wich of them fits on my needs (simply read/write
sequential data)...


..NET has rich collection of XML related classes, usually each one is
designed to facilitate particular XML usage. But all of them use the
same XML plumbing underneath.
To sequential read/write XML doc you can use XmlReader/XmlWriter, if you
need full document in memory with update option - XmlDocument, readonly
- XPathDocument. System.Data namespace provides classes like
XmlDataDocument and DataSet.
But the most easy your task can be done is using XML serialization -
just create object model of your data and serialize it to a file and
deserialize back in just one call.
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: wallacej | last post by:
Hello Can anybody explain to me why the following four FPRINTF lines of code yield different results to their Console counterparts on the next line? By my reckoning the results should be te same...
3
by: Andrew Luke | last post by:
Hi all you C++ guru's! I'm 'very, very' new to C++ and I'm having a little trouble configuring my VS environment I think - when I try and compile some sample code I'm getting the following...
10
by: Dave | last post by:
Has anyone out there managed to create a structured storage file using pure VB.Net? Specifically; with the API function StgCreateStorageEx? If so, could you post a working example here please. One...
3
by: Fred | last post by:
Hi, I want to be able to read and write to the custom properties of any Office type file. In Windows explorer I can do this manually by right clicking on a file selecting 'properties' from the...
2
by: Bob | last post by:
Using VS2005 andf VB.NET how can you store a faile in protected storage. How can you retrieve and open a file from protected storage? Can anyone point me to snippets of code doing this? Thanks for...
2
by: bballr | last post by:
I have a problem that I'm not sure if it can be done. I'm trying to use the MySQL C API to be able to use a normal sql insert statement that will send the data or file to a directory and NOT the...
14
by: ml_sauls | last post by:
I've built a system to enter and manage purchase orders. This is in use by >10 clients. Some use it in Access 97, most are in A2k. About half use it through a Citrix implementation. It is...
4
by: Richard Lewis Haggard | last post by:
I have an application that can't use the registry to save various user options and application settings. My first thought was to simply use an application configuration file but this approach seems...
2
by: pmlane2001 | last post by:
I have a PHP SOAP XML file size problem that I was wondering if anyone has seen before. I have an XML file that when I put it through my PHP script with 270 lines (13,082 KB) it works fine. If I...
1
by: =?Utf-8?B?c3Vpcw==?= | last post by:
Hi every body, i have a problem with how to read .MSG file (Outlook) using vb.net ? using this articles the author has already explain how to read .MSG file using stuctured storage (vc++) ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...

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.