You can override the namespace specified in the element type. For instance. You can have
[XmlElement(Namespace="http://foo.com")]
public Element Element;
And the output will be
<Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.test.com">
<Element xmlns="http://foo.com">
<X xmlns="http://www.test.com">1</X>
</Element>
</Root>
Microsoft Form = XmlSchemaForm.Unqualified Namespace "". , , - ( MSDN). , :
Unhandled Exception: System.InvalidOperationException: There was an error reflecting type 'XmlSerializationTest.Root'. ---> System.InvalidOperationException: There was an error reflecting field 'Element'. ---> System.InvalidOperationException: The Form property may not be 'Unqualified' when an explicit Namespace property is present.