XML Invalid Root Data

From Birnam Designs Wiki

Jump to: navigation, search

I was trying to load an XML document with C# in ASP.NET and got this error:

The data at the root level is invalid. Line 1, position 1.

It turned out to be a simple mistake. I was trying to load with XmlDocument.LoadXml(pathtofile). Instead I should have used XmlDocument.Load(pathtofile).

Share This!
This page was last modified on 15 April 2009, at 04:55. This page has been accessed 342 times.