K
Keith Henderson
I have an xml document loaded into a string that I need to parse. below is
the first few elements in the xml string.
<?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">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Table">
<xs:complexType>
<xs:sequence>
<xs:element name="CustomerShortName">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CreateDate" type="xs:dateTime" />
.... there is more I didn't show......
I need to step through it and if you look closely you see 2 keys
identifying column names, CustomerShortName and CreateDate
they are defined as
<xs:element name="CustomerShortName">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10" />
</xs:restriction>
</xs:simpleType>
</xs:element>
and
<xs:element name="CreateDate" type="xs:dateTime" />
I need to step through the entire xml document and retrieve out
CustomerShortName, string, 10
and
CreateDate, dateTime
can someone show me how to parse this?
the first few elements in the xml string.
<?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">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Table">
<xs:complexType>
<xs:sequence>
<xs:element name="CustomerShortName">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CreateDate" type="xs:dateTime" />
.... there is more I didn't show......
I need to step through it and if you look closely you see 2 keys
identifying column names, CustomerShortName and CreateDate
they are defined as
<xs:element name="CustomerShortName">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10" />
</xs:restriction>
</xs:simpleType>
</xs:element>
and
<xs:element name="CreateDate" type="xs:dateTime" />
I need to step through the entire xml document and retrieve out
CustomerShortName, string, 10
and
CreateDate, dateTime
can someone show me how to parse this?