[Use this method] XmlOptions.setSaveAggresiveNamespaces() [To specify this] 
To minimize the number of namespace attributes generated for the saved XML. Note that this can reduce performance significantly.