XML Data Access

P

Peter

Hello,

I must confess I am now very confused. I am simply trying to write a program
that uses data from various XML files to populate a sea of controls, and
uses them in turn to make changes to the XML files. Sounds easy, right? I'm
used to programming in VB, but this is my first foray into data programming
for Windows. I am used to doing that kind of thing in MySQL via PHP. I
therefore have lots of questions, and I don't know what they are.

I have gotten as far as creating an XML schema for one particular flavor of
XML file I'll be using. I'm not clear on why I had to do that, but the
documentation convinced me that I'd be happier and better-looking if I did,
so I spent an evening and managed to do it. Now what good is it, exactly?

I also don't know what would be more appropriate... using a dataset to load
the XML data and display it, or simply using some version of XML reader? And
I don't have any idea where the XML schema I just made fits into the
process. Can I use the schema to reference elements by name instead of using
methods like NextSibling and so forth?

What is data binding? Is it relevant to this? Do I need to do it? Can I get
away without doing it? Would I be cheating if I did? Would my breath be
better? The words "data binding" seem so pretty...

By the way, why can't I use my shiny new XML schema file to instantiate a
typed dataset? If I go to "Add New Item" and select "Dataset," it creates a
blank XSD file I can simply copy and paste the schema info into. But the XML
schema doesn't show up in the Referenced Datasets menu in the form designer.

I guess the main problem is that the documentation gives examples 40 zillion
options of how to do... something. Many things, actually. But I don't know
what those somethings are, how they fit together, and which bit of
information I need to know first in order to implement any of them. And all
the examples present their methods as doing something particularly useful or
helpful, things I didn't know I needed to do (and still am not convinced),
like creating the XML schema.

Help!
 
P

Peter

I suppose part of this problem is just not knowing what questions to ask,
and so riding the whimsical currents of the documentation. It's somewhat
like wanting to wash a sink full of dishes, but only having at one's
disposal a garbled heap of documents with titles like, "pH balancing your
detergent," "Current china patterns in use," "List of hydroxylated anionic
surfactants," and "Basics of attractive food presentation."

Where on earth is the one that says, "Apply dishsoap and water, lather,
scrub and rinse"?
 
B

bz

By the way, why can't I use my shiny new XML schema file to instantiate a
typed dataset? If I go to "Add New Item" and select "Dataset," it creates a
blank XSD file I can simply copy and paste the schema info into. But the
XML schema doesn't show up in the Referenced Datasets menu in the form
designer.


I have been researching the same issue.
I nailed it down to a EXE in the VB folder call XSD.EXE
It is a command line program. So, you need to go to the dos prompt and type
the arguments.

It is supposed to create a Dataset source code (VB or C#) from the XSD file
for you to access the XML file in your program.


I tried it once but I had no idea what it did. And I am tired of reading
the documents. So, I opened the source code to see and it was a mess to
read.

I searched more and found something called XSD2DB in the Open Source site.
It worked with simple XSD but not something with nested elements after
elements.
 
B

bz

Peter said:
I suppose part of this problem is just not knowing what questions to ask,
and so riding the whimsical currents of the documentation. It's somewhat
like wanting to wash a sink full of dishes, but only having at one's
disposal a garbled heap of documents with titles like, "pH balancing your
detergent," "Current china patterns in use," "List of hydroxylated anionic
surfactants," and "Basics of attractive food presentation."

Where on earth is the one that says, "Apply dishsoap and water, lather,
scrub and rinse"?

Totally!!! You said it all!!!
the documents from MSDN used to be very good. Now it is too (to infinity)
technical. It is not practical to read.
 
P

Peter

I suppose part of this problem is just not knowing what questions to ask,
Totally!!! You said it all!!!
the documents from MSDN used to be very good. Now it is too (to infinity)
technical. It is not practical to read.

Well, I'm not going to say the documentation hasn't been immensely helpful
to me... on some things. It did teach me how to use the XSD designer, and
how to do almost all I currently know how to do in VB. There's just a
certain element of why and wherefore missing; a grounding influence that
brings real-world perspective to the abstract concepts it treats.

Maybe that's where a good VB book would come in handy...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top