XML Attribute -
06-27-2006
, 11:56 AM
I have to serialize a class to an XML file. The root element needs to have
the following attribute: xsi:noNamespaceSchemaLocation="..\Order.xsd"
Here's the property definition:
[XmlAttribute("xsi:noNamespaceSchemaLocation")]
public string noNamespaceSchemaLocation;
But this gives me the runtime error: {"There was an error reflecting field
'noNamespaceSchemaLocation'."} with the InnerException {"Invalid name
character in 'xsi:noNamespaceSchemaLocation'."}
Thanks. |