Unexpected token error when using XmlDataSource asp control
<p>I have XML like this:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;viewentries timestamp="20100923T130205,90Z" toplevelentries="8903"&gt;
   &lt;viewentry position="1" unid="A4958CC88435D1A8422577A7004422E8" noteid="4DF15A" siblings="8903"&gt;
      &lt;entrydata columnnumber="0" name="$59"&gt;
         &lt;text&gt;63722&lt;/text&gt;
      &lt;/entrydata&gt;
      &lt;entrydata columnnumber="1" name="$70"&gt;
         &lt;text&gt;&lt;/text&gt;
      &lt;/entrydata&gt;
      &lt;entrydata columnnumber="2" name="pt_Subject"&gt;
         &lt;text&gt;work order subject&lt;/text&gt;
      &lt;/entrydata&gt;
      &lt;entrydata columnnumber="3" name="$56"&gt;
         &lt;datetime dst="true"&gt;20100923T145811,67+02&lt;/datetime&gt;
      &lt;/entrydata&gt;
      &lt;entrydata columnnumber="4" name="$62"&gt;
         &lt;datetime&gt;20100923T142413,84+02&lt;/datetime&gt;
      &lt;/entrydata&gt;
      &lt;entrydata columnnumber="5" name="$60"&gt;
         &lt;text&gt;some company&lt;/text&gt;
      &lt;/entrydata&gt;
      &lt;entrydata columnnumber="6" name="$73"&gt;
         &lt;text&gt;Resolver&lt;/text&gt;
      &lt;/entrydata&gt;
   &lt;/viewentry&gt;
&lt;/viewentries&gt;
</code></pre>

<p>As this XML resides on a web server, I need to read it from there. Thus, I use XmlDataSource control like this:</p>

<pre><code>&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;#WO&lt;/td&gt;
        &lt;td&gt;Description&lt;/td&gt;
        &lt;td&gt;Company&lt;/td&gt;
    &lt;/tr&gt;
&lt;asp:Repeater ID="repWorkOrders" DataSourceID="xmldsWorkOrders" runat="server"&gt;
    &lt;ItemTemplate&gt;           
        &lt;tr&gt;
            &lt;td&gt;&lt;%#XPath( "entrydata[1]/text" )%&gt;&lt;/td&gt;
            &lt;td&gt;&lt;%#XPath( "entrydata[3]/text" )%&gt;&lt;/td&gt;
            &lt;td&gt;&lt;%#XPath( "entrydata[6]/text" )%&gt;&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/ItemTemplate&gt;
&lt;/asp:Repeater&gt;
&lt;/table&gt;
&lt;asp:XmlDataSource ID="xmldsWorkOrders" XPath="viewentries/viewentry" DataFile="http://www.someurl.com/xmlfile.xml" runat="server"&gt;
&lt;/asp:XmlDataSource&gt;
</code></pre>

<p>The problem is that if I set DataFile to URL, I get following error</p>

<blockquote>
  <p>'>' is an unexpected token. The expected token is '"' or '''. Line 1,
  position 63. Description: An unhandled
  exception occurred during the
  execution of the current web request.
  Please review the stack trace for more
  information about the error and where
  it originated in the code.</p>
  
  <p>Exception Details:
  System.Xml.XmlException: '>' is an
  unexpected token. The expected token
  is '"' or '''. Line 1, position 63.</p>
  
  <p>Source Error:</p>
  
  <p>An unhandled exception was generated
  during the execution of the current
  web request. Information regarding the
  origin and location of the exception
  can be identified using the exception
  stack trace below.</p>
  
  <p>Stack Trace:</p>
  
  <p>[XmlException: '>' is an unexpected
  token. The expected token is '"' or
  '''. Line 1, position 63.]<br>
  System.Xml.XmlTextReaderImpl.Throw(Exception
  e) +76<br>
  System.Xml.DtdParserProxy.System.Xml.IDtdParserAdapter.Throw(Exception
  e) +9<br>
  System.Xml.DtdParser.Throw(Int32
  curPos, String res, String[] args)
  +125    System.Xml.DtdParser.ThrowUnexpectedToken(Int32
  pos, String expectedToken1, String
  expectedToken2) +109<br>
  System.Xml.DtdParser.ParseExternalId(Token
  idTokenType, Token declType, String&amp;
  publicId, String&amp; systemId) +598<br>
  System.Xml.DtdParser.ParseInDocumentDtd(Boolean
  saveInternalSubset) +4016890<br>
  System.Xml.DtdParser.Parse(Boolean
  saveInternalSubset) +54<br>
  System.Xml.DtdParserProxy.Parse(Boolean
  saveInternalSubset) +31<br>
  System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()
  +254    System.Xml.XmlTextReaderImpl.ParseDocumentContent()
  +451    System.Xml.XmlTextReaderImpl.Read()
  +151    System.Xml.XmlLoader.Load(XmlDocument
  doc, XmlReader reader, Boolean
  preserveWhitespace) +112<br>
  System.Xml.XmlDocument.Load(XmlReader
  reader) +108<br>
  System.Web.UI.WebControls.XmlDataSource.PopulateXmlDocument(XmlDocument
  document, CacheDependency&amp;
  dataCacheDependency, CacheDependency&amp;
  transformCacheDependency) +306<br>
  System.Web.UI.WebControls.XmlDataSource.GetXmlDocument()
  +153    System.Web.UI.WebControls.XmlDataSourceView.ExecuteSelect(DataSourceSelectArguments
  arguments) +27<br>
  System.Web.UI.WebControls.Repeater.GetData()
  +35    System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean
  useDataSource) +220<br>
  System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs
  e) +51<br>
  System.Web.UI.WebControls.Repeater.DataBind()
  +75    System.Web.UI.WebControls.Repeater.EnsureDataBound()
  +55    System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs
  e) +15<br>
  System.Web.UI.Control.PreRenderRecursiveInternal()
  +80    System.Web.UI.Control.PreRenderRecursiveInternal()
  +171    System.Web.UI.Control.PreRenderRecursiveInternal()
  +171    System.Web.UI.Control.PreRenderRecursiveInternal()
  +171    System.Web.UI.Page.ProcessRequestMain(Boolean
  includeStagesBeforeAsyncPoint, Boolean
  includeStagesAfterAsyncPoint) +842</p>
</blockquote>

<p>However, if I save the same xml to a file to my computer, it works without a glitch. Please, help.</p>
