.NET DataSet
class autogenerate following schema (I added blank lines for clarity):
<?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>
The scheme is generated in a single file along with the data.
Note the absence of Points
and Lines
elements.
Unfortunately is the schema of version 1.0. Therefore, more advanced checks is not available.
Attributes with the msdata
prefix can be removed.