ASP.net parsing Diffgrams in XML to use in DataList
<p>I have a method:</p>

<pre><code>public static DataSet getTable()
{
    DataSet DS = new DataSet("My Set");
    DS.ReadXml(getCategories());
    return DS;
}
</code></pre>

<p>My getCategories() returns a stream containing my XML.</p>

<p>But when I run this, I get this error:
The supplied xml instance is a schema or contains an inline schema. This class cannot infer a schema for a schema.</p>

<p>So I'm not sure what to do.</p>

<p>My goal is to use the call to getTable() to populate a DataList.</p>

<p>I've tried using the DataTable and I get a different, but similar error.</p>

<p>Any help would be great.</p>

<p>Thanks.</p>

<p>Here is my XML file.  Might help.  Thanks.</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;WSPackage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/"&gt;
  &lt;ResponseInteger&gt;0&lt;/ResponseInteger&gt;
  &lt;ResponseBoolean&gt;false&lt;/ResponseBoolean&gt;
  &lt;ResponseDataset&gt;
    &lt;xs:schema id="CategoryDS" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&gt;
      &lt;xs:element name="CategoryDS" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"&gt;
        &lt;xs:complexType&gt;
          &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;

            &lt;xs:element name="Category"&gt;
              &lt;xs:complexType&gt;
                &lt;xs:sequence&gt;
                  &lt;xs:element name="PartCategories" type="xs:string" minOccurs="0" /&gt;
                  &lt;xs:element name="CategoryDescriptions" type="xs:string" minOccurs="0" /&gt;
                  &lt;xs:element name="CategoryImageURLs" type="xs:string" minOccurs="0" /&gt;
                  &lt;xs:element name="CategoryModelFlags" type="xs:string" minOccurs="0" /&gt;
                &lt;/xs:sequence&gt;
              &lt;/xs:complexType&gt;

            &lt;/xs:element&gt;
          &lt;/xs:choice&gt;
        &lt;/xs:complexType&gt;
      &lt;/xs:element&gt;
    &lt;/xs:schema&gt;
    &lt;diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"&gt;
      &lt;CategoryDS xmlns=""&gt;
        &lt;Category diffgr:id="Category1" msdata:rowOrder="0" diffgr:hasChanges="inserted"&gt;
          &lt;PartCategories&gt;TESTCAT&lt;/PartCategories&gt;

          &lt;CategoryDescriptions&gt;TESTING API&lt;/CategoryDescriptions&gt;
          &lt;CategoryImageURLs /&gt;
          &lt;CategoryModelFlags /&gt;
        &lt;/Category&gt;
      &lt;/CategoryDS&gt;
    &lt;/diffgr:diffgram&gt;
  &lt;/ResponseDataset&gt;
  &lt;ErrorMessage /&gt;

  &lt;UserMessage /&gt;
&lt;/WSPackage&gt;
</code></pre>
