Hi all,
I have this code:
XmlDocument doc = new XmlDocument();
doc.LoadXml(path);
(path is c:\InetPub\Bleh\Config.xml)
The xml document contains:
<?xml version="1.0" encoding="utf-8" ?>
<urlrewriter>
<rule pattern="bleh" rewrite="blah" />
</urlrewriter>
And when it runs I get:
The data at the root level is invalid. Line 1, position 1.
If I read the xml doc using a XmlTextReader it works fine, I only get this error with the XmlDocument.
Im all out of ideas on this one so any suggestions would be much appreciated,
Thanks,
Matt.
I have this code:
XmlDocument doc = new XmlDocument();
doc.LoadXml(path);
(path is c:\InetPub\Bleh\Config.xml)
The xml document contains:
<?xml version="1.0" encoding="utf-8" ?>
<urlrewriter>
<rule pattern="bleh" rewrite="blah" />
</urlrewriter>
And when it runs I get:
The data at the root level is invalid. Line 1, position 1.
If I read the xml doc using a XmlTextReader it works fine, I only get this error with the XmlDocument.
Im all out of ideas on this one so any suggestions would be much appreciated,
Thanks,
Matt.