469,613 Members | 1,354 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,613 developers. It's quick & easy.

Several design questions

I'm storing my data inside an XML file, the data is divided into several
niches.
I expect two things to happen during normal use of the application:
A> Number of niches to grow.
B> Amount of information in niche would grow.
This would result in one big file, it's not too much trouble to change it
now to mutliply files, the question is what would be better from design and
performance perspective?

Several other questions:
I'm reading data from XML in two ways right now:
A> By loading the XML to an XMLDocument and then doing a seria of XPath
queries.
B> By iterating over all the nodes using foreach and a giant switch
statement.
What is better (design & perfomance) would it be better to use XMLReader and
the giant switch? Or is there another way?

Another thing, saving the data:
Currently I'm doing this via XMLDocument.Save() after updating all the
fields that have been changed.
Would XMLWriter be better?

I'm going to write an image to the file, is the only way to retrieve it is
via XMLReader.GetBinary() or does XMLDocument has that option too?

Thanks in advance,
Ayende Rahien
Jul 21 '05 #1
1 1182

"Ayende Rahien" <Ay****@no.spam> wrote in message
news:er****************@TK2MSFTNGP09.phx.gbl...
I'm storing my data inside an XML file, the data is divided into several
niches.
I expect two things to happen during normal use of the application:
A> Number of niches to grow.
B> Amount of information in niche would grow.
This would result in one big file, it's not too much trouble to change it
now to mutliply files, the question is what would be better from design and performance perspective?

Several other questions:
I'm reading data from XML in two ways right now:
A> By loading the XML to an XMLDocument and then doing a seria of XPath
queries.
B> By iterating over all the nodes using foreach and a giant switch
statement.
What is better (design & perfomance) would it be better to use XMLReader and the giant switch? Or is there another way?

Another thing, saving the data:
Currently I'm doing this via XMLDocument.Save() after updating all the
fields that have been changed.
Would XMLWriter be better?

I'm going to write an image to the file, is the only way to retrieve it is
via XMLReader.GetBinary() or does XMLDocument has that option too?


One more thing, I've an information storage class (IE, a class that does
nothing except store information) that I currently load/save from XML.
Would it be wiser to just save the node containing the data about this class
and return it via XPath queries using propeties?
Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.