Hey there,
Just starting out messing with XML in .NET. I'm just trying to read some
simple XML that I'm using to pass data structures between programs.
Something like this:
<?xml version="1.0" encoding="utf-8"?>
<Chris>
<One>1</One>
<Two>2</Two>
</Chris>
So I create the above in a file, create a matching XSD in Visual Studio, and
use a FileStream and XmlSerializer to try and read the thing in. I always
get an error at (2,2) unless I make the 2nd line look like this:
<Chris xmlns="http://tempuri.org/Chris.xsd">
I'm presuming that it doesn't want to parse it because it's trying to match
this line in my auto-generated .CS file:
[System.Xml.Serialization.XmlRootAttribute(Namespac e="http://tempuri.org/Chris.xsd", IsNullable=false)]
Do I have to have this xmlns deal in that line or what?
Thanks!