Note that there are some explanatory texts on larger screens.

plurals
  1. POdoctype' is an unexpected token error
    primarykey
    data
    text
    <p>Recently users who are using my .NET application encountered some problems regarding this error message while running: <code>doctype' is an unexpected token. the expected token is 'doctype'</code>.</p> <p>Interesting thing is that only few out of the hundreds people encountered this problem.</p> <p>This is how my XML file looks like:</p> <pre><code>&lt;?xml version='1.0'?&gt; &lt;build&gt; &lt;row&gt; &lt;car&gt;Type&lt;/car&gt; &lt;enum&gt;12&lt;/enum&gt; &lt;/row&gt; &lt;row&gt; &lt;car&gt;Type1&lt;/car&gt; &lt;enum&gt;14&lt;/enum&gt; &lt;/row&gt; &lt;row&gt; &lt;car&gt;Type2&lt;/car&gt; &lt;enum&gt;15&lt;/enum&gt; &lt;/row&gt; &lt;/build&gt; </code></pre> <p>What I am actually doing in the .NET application is a loop through the XML elements and displaying the <code>&lt;car&gt;</code> on each loop.</p> <p>I've been trying recommend people installing the latest .NET Framework library but this doesn't help.</p> <p>What is causing this error and how could it be fixed?</p> <h1>edit</h1> <p>vb.net snippet of code:</p> <pre><code>Dim client As WebClient = New WebClient() client.Encoding = System.Text.Encoding.UTF8 Dim data As String = client.DownloadString("http://mywebsite.com/code.php") While client.IsBusy Threading.Thread.Sleep(100) End While Dim doc As New System.Xml.XmlDocument doc.LoadXml(data) For Each row As System.Xml.XmlElement In list 'proceed the element(s)... Next </code></pre> <p>^ code.php , which is responsible for the output XML string:</p> <pre><code>&lt;?php header('Content-Type: text/xml; charset=utf-8;'); ini_set('default_mimetype', "text/xml"); ini_set('default_charset', "utf-8"); echo "&lt;?xml version='1.0'?&gt; &lt;build&gt;"; foreach ($_engine as $line) { echo '&lt;row&gt;&lt;car&gt;' . htmlspecialchars($line-&gt;car) . '&lt;/car&gt;&lt;enum&gt;' . (int)$line-&gt;enum . '&lt;/enum&gt;&lt;/date&gt;&lt;/row&gt;'; } echo "&lt;/build&gt;"; ?&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.
 

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