How to add xsi:schemaLocation to serialized object
<p>How can I add the following xsi:schemaLocation to a serialized class?</p>

<pre><code>&lt;ern:NewReleaseMessage xmlns:ern="http://ddex.net/xml/2010/ern-main/32"
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                       LanguageAndScriptCode="en"
                       xsi:schemaLocation="http://ddex.net/xml/2010/ern-main/32 http://ddex.net/xml/2010/ern-main/32/ern-main.xsd"
                       MessageSchemaVersionId="2010/ern-main/32"&gt;
</code></pre>

<p>Here is what I have done so far:</p>

<pre><code>public class NewReleaseMessage
{
    [XmlAttribute]
    public string LanguageAndScriptCode { get; set; }

    [XmlAttribute("schemaLocation", Namespace = "http://ddex.net/xml/2010/ern-main/32")] 
    public string  schemaLocation = "http://ddex.net/xml/2010/ern-main/32 http://ddex.net/xml/2010/ern-main/32/ern-main.xsd";

    [XmlAttribute]
    public string MessageSchemaVersionId { get; set; }

    [XmlElement()]
    public MessageHeader MessageHeader { get; set; }

}
</code></pre>

<p>When I deserialize the xml to the object in VS I get:</p>

<p>{"The method or operation is not implemented."
There is an error in XML document (5, 44) - This actually points to the line: xsi:schemaLocation="http://ddex.net/xml/2010/ern-main/32 <a href="http://ddex.net/xml/2010/ern-main/32/ern-main.xsd" rel="nofollow">http://ddex.net/xml/2010/ern-main/32/ern-main.xsd</a>"</p>
