SQL and XML

N

nobody

I know you can use Dataset.ReadXML, Dataset.ReadXMLSchema, and
Dataset.WriteXML to use an XML file as a datasource. My question is can you
do SQL against an XML datasource? Since you're using the Dataset, you're
bypassing the DataAdapter, and I don't see an OleDb provider listed in
Server Explorer for XML.
 
C

Cor

Only one answe No,

In memory it is greath, on disk it is nothing more than a text file.

Cor
 
K

Keenan Newton

Well no you can't treat an XML datasource as if it were SQL. And this is
for good reason, XML can be contain complex hierachies of data. with XML
you will probably want to use Xpath and/or XQuery.

Keenan
 
N

nobody

Hadn't heard of XPath or XQuery either one. I'll research them and see if
they might be of use. Are they part of the .NET Framework, or third-party
libraries?

----
 
D

Derek Harmon

nobody said:
Hadn't heard of XPath or XQuery either one. I'll research them and see if
they might be of use. Are they part of the .NET Framework, or third-party
libraries?

XPath 1.0 support is solidly baked into the .NET Framework at the very foundation of the
System.Xml.XPath namespace.

XML Query is expected to be present in the next .NET Framework 1.2 ("Whidbey")
release. It's not included in the current release of the .NET Framework.

XML Query is currently a Working Draft, so the spec is written in clay, not stone, at
this point.


Derek Harmon
 
N

nobody

That's the conclusion I had come to after doing a (very) little research on
XPath and XQuery. If I take on any projects that requiry querying an XML
datasource, it looks like XPath provides pretty powerfull capabilities.
It's a new syntax to learn when one already knows SQL, but if it works, and
it is a "rock" (as opposed to clay, mud or dirty water) standard, then I
will end up learning it.

-----
 

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