.NETDataSet
类自动生成以下架构(为清楚起见,我添加了空行):
<?xml version="1.0" standalone="yes"?>
<Root>
<xs:schema id="Root" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="Root" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Point">
<xs:complexType>
<xs:sequence>
<xs:element name="UIDP" type="xs:int" />
<xs:element name="X" type="xs:double" minOccurs="0" />
<xs:element name="Y" type="xs:double" minOccurs="0" />
<xs:element name="MX" type="xs:double" minOccurs="0" />
<xs:element name="MY" type="xs:double" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Line">
<xs:complexType>
<xs:sequence>
<xs:element name="Point1" type="xs:int" />
<xs:element name="Point2" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="PK_Points" msdata:PrimaryKey="true">
<xs:selector xpath=".//Point" />
<xs:field xpath="UIDP" />
</xs:unique>
<xs:unique name="PK_Lines" msdata:PrimaryKey="true">
<xs:selector xpath=".//Line" />
<xs:field xpath="Point1" />
<xs:field xpath="Point2" />
</xs:unique>
<xs:keyref name="FK_Lines2" refer="PK_Points" msdata:ConstraintOnly="true">
<xs:selector xpath=".//Line" />
<xs:field xpath="Point2" />
</xs:keyref>
<xs:keyref name="FK_Lines1" refer="PK_Points" msdata:ConstraintOnly="true">
<xs:selector xpath=".//Line" />
<xs:field xpath="Point1" />
</xs:keyref>
</xs:element>
</xs:schema>
<Point>
<UIDP>1</UIDP>
<X>5379847.689</X>
<Y>1223602.644</Y>
<MX>0.05</MX>
<MY>0.05</MY>
</Point>
<Point>
<UIDP>2</UIDP>
<X>5379828.473</X>
<Y>1223606.113</Y>
<MX>0.05</MX>
<MY>0.05</MY>
</Point>
<Line>
<Point1>1</Point1>
<Point2>2</Point2>
</Line>
</Root>
该方案与数据一起在单个文件中生成。
Points
注意和Lines
元素的缺失。
不幸的是 1.0 版的架构。因此,更高级的检查不可用。
msdata
可以删除带有前缀的属性。