If you are unable to get rid of extra xmlns attributes for each element, when serializing to xml from generated classes (e.g.: when xsd.exe was used), so you have something like:
<manyElementWith xmlns="urn:names:specification:schema:xsd:one" />
then i would share with you what worked for me (a mix of previous answers and what i found here)
explicitly set all your different xmlns as follows:
Dim xmlns = New XmlSerializerNamespaces()
xmlns.Add("one", "urn:names:specification:schema:xsd:one")
xmlns.Add("two", "urn:names:specification:schema:xsd:two")
xmlns.Add("three", "urn:names:specification:schema:xsd:three")
then pass it to the serialize
serializer.Serialize(writer, object, xmlns);
you will have the three namespaces declared in the root element and no more needed to be generated in the other elements which will be prefixed accordingly
<root xmlns:one="urn:names:specification:schema:xsd:one" ... />
<one:Element />
<two:ElementFromAnotherNameSpace /> ...