I have been playing with XML in VB.net which is rather different from the way you do it in C#,
it seams more natural to traverse nodes. Then, you come across namespaces.
First of all, I used the imports like:
Imports <xmlns:mstns="http://tempuri.org/myDataSet.xsd">
Imports <xmlns="http://tempuri.org/MyDataSet.xsd">
Imports <xmlns:xs="http://www.w3.org/2001/XMLSchema">
Imports <xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
Imports <xmlns:msprop="urn:schemas-microsoft-com:xml-msprop">
and then I tried to access the TableAdapter nodes like this:
Dim doc As XDocument
Dim tableAdapters As XElement
doc = XDocument.Load(file.FullName)
tableAdapters = (From item As XElement In doc.<xs:schema>.
<xs:annotation>.
<xs:appinfo>.
<DataSource>.
<Tables>.
<TableAdapter>
Select item).FirstOrDefault()
[Ignore the line breaks, I did it only for readability]
I can get the nodes correctly until xs:appinfo, after that, any node I attempt to retrieve is null
what am I doing wrong?
Below is the normal xml structure of a dataset:

never mind, I already found the problem. The DataSource node was not using a prefix namespace but it was actually using a namespace AS AN ATTRIBUTE after all. You can see that in the image (as xmlns).
So to solve it, you do like this:
add another imports with the namespace of xmlns found as attribute in the node:
then retrieve like this: