How to add namespace dynamically and xml serialization
<p>my class code as</p>

<pre><code>public class OpenShipments
{
    private string _xmlns = "";
    private OpenShipment _OpenShipment = null;

    [XmlAttribute("xmlns")]
    public string xmlns
    {
        get { return _xmlns; }
        set { _xmlns = "x-schema:" + value; }
    }

    [XmlElement("OpenShipment")]
    public OpenShipment OpenShipment
    {
        get { return _OpenShipment; }
        set { _OpenShipment = value; }
    }

    public OpenShipments()
    {
        _OpenShipment = new OpenShipment();
    }
}
</code></pre>

<p>I include a property called public string xmlns which will have namespace after serializing the code, but no namespace is added when we see the xml.</p>

<p>In my case i need to add namespace dynamically to OpenShipments element whose value will be dynamically set. In my case namespace will look like <code>xmlns="x-schema:C:\UPSLabel\OpenShipments.xdr"</code> and sometime will look like <code>xmlns="x-schema:d:\UPSLabel\OpenShipments.xdr"</code>. </p>

<p>So the namespace value <code>x-schema:d:\UPSLabel\OpenShipments.xdr</code> will differ based on condition. I need advice how to add namespace dynamically to handle the situation.</p>
