Update: I spent more time on this and it seems that I can add extra =
content to the xml file without affecting the behaviour of the dataset. =
It seems to ignore extra-schema elements.
Mark
[quoted text, click to view] "Mark Bosley" wrote in message =
news:eapBDt8KEHA.1132@TK2MSFTNGP12.phx.gbl...
I have a multiple table dataset that I am attempting access thru =
XmlDataDocument, and I have read a bit about this (like Rocky Lhotka's =
article), but I am attempting something outside of the samples I have =
seen.
I can take some Xml like this
<DataSet>
<DriveOption Available=3D"48" DriveOptions=3D"Right Hand Lead =
Screw with Standard Pitch" />
<DriveOption Available=3D"50" DriveOptions=3D"Left Hand Lead =
Screw with Optional Pitch" />
<MO MountingHoleOptions=3D"Standard Inch Sizes" />
<MO MountingHoleOptions=3D"Standard Metric Sizes" />
<CO CarriageOptions=3D"Standard Carriage" />
<CO CarriageOptions=3D"Extended Carriage" />
</DataSet>
create an Xsd, then read the schema in and then read the Xml file and =
access it as a DataSet. Works great.
The actual Xml file I have is like this
<root>
<name>D125</name>
<rulemode>Hierarchical</rulemode>
<modeltype>sldasm</modeltype>
<extraInfo>Hi There</extraInfo>
<DriveOption>
<Available>48</Available>
<DriveOptions>Right Hand Lead Screw with Standard =
Pitch</DriveOptions>
</DriveOption>
<DriveOption>
<Available>50</Available>
<DriveOptions>Left Hand Lead Screw with Optional =
Pitch</DriveOptions>
</DriveOption>
<Methods>
<MO MountingHoleOptions=3D"Standard Inch Sizes" />
<MO MountingHoleOptions=3D"Standard Metric Sizes" />
</Methods>
<Options>
<Option CarriageOptions=3D"Standard Dolphin Carriage" />
<Option CarriageOptions=3D"Extended Dolphin Carriage" />
</Options>
</root>
My question is if there is a way to create an Xsd that would map the =
three tables in Red to their actual locations in the actual Xml file. =
(If I take the file into VS and infer the Xsd, I end up with 10 tables =
or so). Also, you might notice that DriveOption has its columns as =
elements. I know I can use the ColumnMapping setting in code, but is =
there a way to set that in the Xsd?=20