Help with ReadXML

  • Thread starter Thread starter Ryan Ramsey
  • Start date Start date
R

Ryan Ramsey

I currently have this code:

string filePath = "c:\\results.xml"
PlayersDataSet.ReadXml(filePath);

and it works fine, it reads the local xml file into a dataset...
If I change the filePath to a readable source on a remote server:

string filePath = http://finao.net/results.xml;
PlayersDataSet.ReadXml(filePath);

I get an exception:

The 'meta' start tag on line 6 does not match the end tag of 'HEAD'.
Line 7, position 3.

Any suggestions? Im stumped.

Ryan
 
Dear Ryan,

The URL you are accessing, even though has an XML extension it really loads
a HTML page which loads the XML in an internal frame. As this HTML is not a
well formed XML (not considering it doesn't have the data you want!), you
are getting this error. You will see this, if you have a look at the source
of the XML file. Hence if you use the direct XML path (As per the source)
http://70.34.72.73:8089/results.xml, it should load fine.

Hope this helps.

Y. Sivaram
 
Back
Top