Newbie to XML - how to process it.

  • Thread starter Thread starter UJ
  • Start date Start date
U

UJ

I have an XML file that will be downloaded from our server to clients. This
file will list the current versions of the software and if any of them are
newer than what the client has, it will update them. Got the XML file
created, got the download working. My question is what's the easiest way to
read in the XML and then process it. I know I can walk through it after
loading it but that seems like a waste - plus if the data is not in a
specific order could screw me up.

I've create a schema for the data through the XML Designer but don't know
what to do with it...

Any help would be appreciated.

Jeff.
 
Regarding your comment "that seems like a waste", I guess you're saying that
you think there is an unnecessary overhead using all those objects in the Xml
namespace. We thought the same, and especially with datasets which has all
the complexity of Xml plus the added complexity of datasets. So we did some
tests to see the relative performance of using these objects vs other
"light-weight" techniques of our own and in the vast vast vast majority of
cases we couldn't touch them. So, my advise would be to use all those nice
easy objects in the xml and data namespaces and don't worry about the
overhead.

And of course the real answer to this question is ALWAYS: don't fix
something until it's broken, i.e. write it the best/easiest/most elegant way
first, and only afterwards have a look to see if you have a performance (or
any other type of) problem!

So, use "for each node in xml.xmldocument.selectnodes" and by happy it's so
easy.

Incedently, we wrote "Installer" that does something similar to you
requirement but we just itterate through the server's "deployment files"
folders and check each files version number and the last modified date.

Don't worry about a schema unless you're going to allow the xml to be
modified.
 
Back
Top