Hello Steve,
To generate a XML file from XSD file created in DataSet designer, we need
create a dataset object, fill in data and use its WriteXml() method to
generate the XML data.
Also you can read XML data directly into a dataset, for example, test.xml:
<SomeTests>
<TestsGroups>
<Group TestName="TestA " >
<Test>Run1</Test>
<Test>Run2</Test>
<Test>Run3</Test>
</Group>
</TestsGroups>
</SomeTests>
(Your original XML is not valid for a dataset, so I modify a little)
DataSet ds = new DataSet();
ds.ReadXml("c:\ \test.xml");
foreach (DataTable dt in ds.Tables)
{
System.Diagnost ics.Debug.Write Line(dt.TableNa me);
}
We will get three tables in the dataset; TestsGroup, Group and Test.
Anyway, this is not a strong typed dataset. To create a strong type
dataset, you need to create the schema in the dataset designer.
Sincerely,
Luke Zhang
Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.