XmlException - Name cannot begin with the . character
By: Chris Missal
Page 1
I was unable to find the solution to an XmlException awhile back and thought I would re-adress the issue when I had some extra free time. I finally figured out what it was and thought I'd share my findings.
I was trying to write a quick script to grab some data from an Xml file and put it into a tab-delimited text file.
I wasn't able to load the file using the XmlDocument.Load function, I was receiving an unhandled exception.
The exception I was receiving was an XmlException with the message of:
Name cannot begin with the '.' character, hexadecimal value 0x00. Line 1, position 40.
I checked my file and everything looked fine. At the time, all of my xml was on one single line in the file. I assumed this was the problem since it was over 1.2 million columns. It didn't matter how many lines I broke it into. It kept failing.














It turns out an easy fix is all it took. What I did was opened up the xml file in an advanced text-editor (I used