A
Alan Cossey
Hello everyone,,
I have an XML schema file that is read into a dataset using the following
code
ds.ReadXmlSchema(strDataFileSchema)
where ds is the dataset it is going into and strDataFileSchema is the path
for the schema file.
My problem is that it takes 8 seconds to read the thing in. Anyone know why
this might be? I've added the entirety of the file below. It is only 4KB in
size and was created using WriteXMLSchema. The associated data file, at 7KB,
only takes a couple of seconds.
Alan Cossey
<?xml version="1.0" standalone="yes"?>
<xs:schema id="NewDataSet" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true"
msdata:Locale="en-GB">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Company">
<xs:complexType>
<xs:sequence>
<xs:element name="Company" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Task">
<xs:complexType>
<xs:sequence>
<xs:element name="TaskRef" type="xs:int" minOccurs="0" />
<xs:element name="TaskDescription" type="xs:string"
minOccurs="0" />
<xs:element name="Company" type="xs:string" minOccurs="0" />
<xs:element name="OpType" type="xs:string" minOccurs="0" />
<xs:element name="Process" type="xs:string" minOccurs="0" />
<xs:element name="SubProcess" type="xs:string" minOccurs="0"
/>
<xs:element name="Location" type="xs:string" minOccurs="0" />
<xs:element name="SubLocation" type="xs:string" minOccurs="0"
/>
<xs:element name="Existing" type="xs:short" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="OpType">
<xs:complexType>
<xs:sequence>
<xs:element name="OpType" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Process">
<xs:complexType>
<xs:sequence>
<xs:element name="Company" type="xs:string" minOccurs="0" />
<xs:element name="Process" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SubProcess">
<xs:complexType>
<xs:sequence>
<xs:element name="Company" type="xs:string" minOccurs="0" />
<xs:element name="Process" type="xs:string" minOccurs="0" />
<xs:element name="SubProcess" type="xs:string" minOccurs="0"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Location">
<xs:complexType>
<xs:sequence>
<xs:element name="Company" type="xs:string" minOccurs="0" />
<xs:element name="Location" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SubLocation">
<xs:complexType>
<xs:sequence>
<xs:element name="Company" type="xs:string" minOccurs="0" />
<xs:element name="Location" type="xs:string" minOccurs="0" />
<xs:element name="SubLocation" type="xs:string" minOccurs="0"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
I have an XML schema file that is read into a dataset using the following
code
ds.ReadXmlSchema(strDataFileSchema)
where ds is the dataset it is going into and strDataFileSchema is the path
for the schema file.
My problem is that it takes 8 seconds to read the thing in. Anyone know why
this might be? I've added the entirety of the file below. It is only 4KB in
size and was created using WriteXMLSchema. The associated data file, at 7KB,
only takes a couple of seconds.
Alan Cossey
<?xml version="1.0" standalone="yes"?>
<xs:schema id="NewDataSet" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true"
msdata:Locale="en-GB">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Company">
<xs:complexType>
<xs:sequence>
<xs:element name="Company" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Task">
<xs:complexType>
<xs:sequence>
<xs:element name="TaskRef" type="xs:int" minOccurs="0" />
<xs:element name="TaskDescription" type="xs:string"
minOccurs="0" />
<xs:element name="Company" type="xs:string" minOccurs="0" />
<xs:element name="OpType" type="xs:string" minOccurs="0" />
<xs:element name="Process" type="xs:string" minOccurs="0" />
<xs:element name="SubProcess" type="xs:string" minOccurs="0"
/>
<xs:element name="Location" type="xs:string" minOccurs="0" />
<xs:element name="SubLocation" type="xs:string" minOccurs="0"
/>
<xs:element name="Existing" type="xs:short" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="OpType">
<xs:complexType>
<xs:sequence>
<xs:element name="OpType" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Process">
<xs:complexType>
<xs:sequence>
<xs:element name="Company" type="xs:string" minOccurs="0" />
<xs:element name="Process" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SubProcess">
<xs:complexType>
<xs:sequence>
<xs:element name="Company" type="xs:string" minOccurs="0" />
<xs:element name="Process" type="xs:string" minOccurs="0" />
<xs:element name="SubProcess" type="xs:string" minOccurs="0"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Location">
<xs:complexType>
<xs:sequence>
<xs:element name="Company" type="xs:string" minOccurs="0" />
<xs:element name="Location" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SubLocation">
<xs:complexType>
<xs:sequence>
<xs:element name="Company" type="xs:string" minOccurs="0" />
<xs:element name="Location" type="xs:string" minOccurs="0" />
<xs:element name="SubLocation" type="xs:string" minOccurs="0"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>