Note that there are some explanatory texts on larger screens.

plurals
  1. PODataTable ReadXmlSchema and ReadXml Resulting in error
    primarykey
    data
    text
    <p>I'm having some trouble with the ReadXmlSchema and ReadXml methods for a DataTable. I'm getting the error "DataTable does not support schema inference from Xml".</p> <p>Code Snippet: I've tried </p> <pre><code>Table.ReadXmlSchema(new StringReader(File.ReadAllText(XsdFilePath))); Table.ReadXml(new StringReader(File.ReadAllText(XmlFilePath))); </code></pre> <p>And</p> <pre><code>Table.ReadXmlSchema(XsdFilePath); Table.ReadXml(XmlFilePath); </code></pre> <p>Xml Snippet:</p> <pre><code>&lt;ScreenSets&gt; &lt;ScreenSet id="Credit 1"&gt; &lt;Screen xmlFile="sb-credit1.en.xml" tabText="Recommendation" isCached="false"&gt; &lt;Buttons&gt; &lt;Button id="btnClosePresentation"/&gt; &lt;/Buttons&gt; &lt;/Screen&gt; &lt;/ScreenSet&gt; &lt;ScreenSet id="Credit 2"&gt; &lt;Screen xmlFile="sb-credit2.en.xml" tabText="Recommendation" isCached="false"&gt; &lt;Buttons&gt; &lt;Button id="btnClosePresentation"/&gt; &lt;/Buttons&gt; &lt;/Screen&gt; &lt;/ScreenSet&gt; &lt;ScreenSet id="Credit 3"&gt; &lt;Screen xmlFile="sb-credit3.en.xml" tabText="Recommendation" isCached="false"&gt; &lt;Buttons&gt; &lt;Button id="btnClosePresentation"/&gt; &lt;/Buttons&gt; &lt;/Screen&gt; &lt;/ScreenSet&gt; &lt;/ScreenSets&gt; </code></pre> <p>Xsd:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; &lt;xs:element name="ScreenSets"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:element maxOccurs="unbounded" name="ScreenSet"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:element name="Screen"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:element name="Buttons"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:element maxOccurs="unbounded" name="Button"&gt; &lt;xs:complexType&gt; &lt;xs:attribute name="id" type="xs:string" use="required" /&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;/xs:sequence&gt; &lt;xs:attribute name="xmlFile" type="xs:string" use="required" /&gt; &lt;xs:attribute name="tabText" type="xs:string" use="required" /&gt; &lt;xs:attribute name="isCached" type="xs:boolean" use="required" /&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;/xs:sequence&gt; &lt;xs:attribute name="id" type="xs:string" use="required" /&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;/xs:schema&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload