Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Opinion on XML data access

Reply
 
Old 03-04-2009   #1 (permalink)
p0


 
 

Opinion on XML data access

Hello,

I'm looking on opinions on data access in .Net. I have an xsl file
containing a xsl:variable with child nodes. I want to create a GUI to
manipulate the content of these child nodes.

Should I load the node in memory as an XmlNode and manipulate its
content directly for every get/set operation? Or should I
'deserialize' the node into several data classes and 'serialize' at
the end of all the getting and setting?

From a performance point of view, neither of those two options should
form a problem. I'm just wondering about 'good practice'.

TIA,

Yves

My System SpecsSystem Spec
Old 03-04-2009   #2 (permalink)
Martin Honnen


 
 

Re: Opinion on XML data access

p0 wrote:

Quote:

> Should I load the node in memory as an XmlNode and manipulate its
> content directly for every get/set operation? Or should I
> 'deserialize' the node into several data classes and 'serialize' at
> the end of all the getting and setting?
>
> From a performance point of view, neither of those two options should
> form a problem. I'm just wondering about 'good practice'.
I am not sure it is a question of good practice. Use the API you are
more familiar with. If you are familiar with the DOM implementation in
the .NET framework (i.e. System.Xml.XmlDocument/XmlElement/XmlNode) then
you should have no problems in using it for the task. If you have no
experience with the DOM then using XmlSerializer to allow you to work
with instances of custom .NET classes can be much more comfortable.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
My System SpecsSystem Spec
Old 03-05-2009   #3 (permalink)
Cor Ligthert[MVP]


 
 

Re: Opinion on XML data access

As good practise the latter is in my idea definitly better
(deserialize/serialize) because then your program becomes easier to
understand and therefore to maintain.

Cor

"p0" <yves.dhondt@xxxxxx> wrote in message
news:1f48a09e-31a1-424a-8238-d5ff2e5c3d76@xxxxxx
Quote:

> Hello,
>
> I'm looking on opinions on data access in .Net. I have an xsl file
> containing a xsl:variable with child nodes. I want to create a GUI to
> manipulate the content of these child nodes.
>
> Should I load the node in memory as an XmlNode and manipulate its
> content directly for every get/set operation? Or should I
> 'deserialize' the node into several data classes and 'serialize' at
> the end of all the getting and setting?
>
> From a performance point of view, neither of those two options should
> form a problem. I'm just wondering about 'good practice'.
>
> TIA,
>
> Yves
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
problem with data access?!?!?! .NET General
Opinion on new Dell XPS m1330 webcam, poor audio, slow, overall opinion-bought June 2 Vista General
How to access data from old XP HDD from Vista? Vista file management
Vista can't access USB data Vista General
Data Access Vista installation & setup


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46