A
arvee
I have an older application that provides a table in the old ADO
disconnected recordset format. For example:
- <xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
- <s:Schema id="RowsetSchema">
- <s:ElementType name="row" content="eltOnly" rs:CommandTimeout="30">
- <s:AttributeType name="ContactName" rs:number="1" rs:nullable="true"
rs:writeunknown="true">
<s:datatype dt:type="string" dt:maxLength="30" />
</s:AttributeType>
<s:extends type="rs:rowbase" />
</s:ElementType>
</s:Schema>
- <rs:data>
<z:row ContactName="Maria Anders" />
<z:row ContactName="Ana Trujillo" />
<z:row ContactName="Antonio Moreno" />
<z:row ContactName="Thomas Hardy" />
<z:row ContactName="Christina Berglund" />
</rs:data>
</xml>
I'd like to read this XML into a new application using .NET into an ADO.NET
Dataset complete w/ the schema. I've tried:
DataSet myDS = new DataSet();
myDS.ReadXml(@"c:\junk\adopersist.xml", XmlReadMode.Auto);
but it comes in as two separate tables. Is there a way to do read the XML
and retain the schema?
Thanks!!!
disconnected recordset format. For example:
- <xml xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
- <s:Schema id="RowsetSchema">
- <s:ElementType name="row" content="eltOnly" rs:CommandTimeout="30">
- <s:AttributeType name="ContactName" rs:number="1" rs:nullable="true"
rs:writeunknown="true">
<s:datatype dt:type="string" dt:maxLength="30" />
</s:AttributeType>
<s:extends type="rs:rowbase" />
</s:ElementType>
</s:Schema>
- <rs:data>
<z:row ContactName="Maria Anders" />
<z:row ContactName="Ana Trujillo" />
<z:row ContactName="Antonio Moreno" />
<z:row ContactName="Thomas Hardy" />
<z:row ContactName="Christina Berglund" />
</rs:data>
</xml>
I'd like to read this XML into a new application using .NET into an ADO.NET
Dataset complete w/ the schema. I've tried:
DataSet myDS = new DataSet();
myDS.ReadXml(@"c:\junk\adopersist.xml", XmlReadMode.Auto);
but it comes in as two separate tables. Is there a way to do read the XML
and retain the schema?
Thanks!!!