As we have seen, the DataSet generated is saved as an .xsd file. If we open the xsd file in a text editor, we see the following HTML like tags, Though we need not know the XML in depth, the marked portion can easily tell us the details about our table name, column names and Key:
<?xml version="1.0" encoding="utf-8" ?> <xs:schema id="DsXML" targetNamespace="http://tempuri.org/DsXML.xsd" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns="http://tempuri.org/DsXML.xsd" xmlns:mstns="http://tempuri.org/DsXML.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="DsXML" msdata:IsDataSet="true"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element name="MyTable"> <xs:complexType> <xs:sequence></xs:sequence> <xs:attribute name="LastName" type="xs:string" /> <xs:attribute name="FirstName" type="xs:string" /> <xs:attribute name="MyID" type="xs:long" /> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> <xs:key name="DsXMLKey1" msdata:PrimaryKey="true"> <xs:selector xpath=".//mstns:MyTable" /> <xs:field xpath="@mstns:MyID" /> </xs:key> </xs:element> </xs:schema> </td> |