Note that there are some explanatory texts on larger screens.

plurals
  1. POXmlException unhandled
    primarykey
    data
    text
    <p>I want to load an XML file that I make by getting data from my database. However, if I want to read that data, it says there"s an error on line 1. Line 1 is strange indeed, because I never asked for "ArrayOfBand". But even when it's there I get all my Bands when i put a break point. It just crashes at the last step. Error HRESULT: 0xC00CE556</p> <p>XAML on localhost</p> <pre><code>&lt;ArrayOfBand xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WindowsStoreApp.Models"&gt; &lt;Band&gt; &lt;Description&gt;Noorse DJ&lt;/Description&gt; &lt;Facebook&gt;Avicii&lt;/Facebook&gt; &lt;ID&gt;156&lt;/ID&gt; &lt;Name&gt;Avicii&lt;/Name&gt; &lt;Picture&gt;..\Images\Avicii.jpg&lt;/Picture&gt; &lt;Twitter&gt;#Avicii&lt;/Twitter&gt; &lt;/Band&gt; &lt;Band&gt; &lt;Description&gt;Heavy Metal&lt;/Description&gt; &lt;Facebook&gt;A7X&lt;/Facebook&gt; &lt;ID&gt;157&lt;/ID&gt; &lt;Name&gt;Avenged Sevenfold&lt;/Name&gt; &lt;Picture&gt;..\Images\A7X.jpg&lt;/Picture&gt; &lt;Twitter&gt;#A7X&lt;/Twitter&gt; &lt;/Band&gt; &lt;/ArrayOfBand&gt; </code></pre> <p>C# xml reader</p> <pre><code> string m_strFilePath = "http://localhost:17281/api/Band"; XmlDocument myXmlDocument = new XmlDocument(); myXmlDocument.Load(m_strFilePath); //Load NOT LoadXml XmlNodeList elemList = myXmlDocument.GetElementsByTagName("Band"); for (int i = 0; i &lt; elemList.Count; i++) { XAML station = new XAML() { ID = elemList[i].Attributes["ID"].InnerText, Name = elemList[i].Attributes["Name"].InnerText }; list.Add(station); } return list; } c# for creating the xml file </code></pre> <p>you can see I'm not asking for an "ArrayOfBand". If i take the file and remove "ArrayOfBand" it works perfectly. Anyone has an idea why it's there? public static List GetBands() { List list = new List(); DbDataReader reader = Database.GetData("SELECT * FROM Band");</p> <pre><code> while (reader.Read()) { Band b = new Band(); b.ID = reader["ID"].ToString(); b.Name = reader["Name"].ToString(); b.Picture = reader["Picture"].ToString(); b.Description = reader["Description"].ToString(); b.Twitter = reader["Twitter"].ToString(); b.Facebook = reader["Facebook"].ToString(); list.Add(b); } return list; } </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.
 

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