> When I marshall my classes the xmlns is being printed as an attribute
> with the root element (loaderJob) such as.:
This attribute you are talking about is a so called namespace
declaration and in this case this is a default namespace declaration.
The elements in your XML document are said to be in the
'
http://www.objectweb.org' namespace. Namespaces are quite important
and provide "universally unique names for elements and attributes"
[1]. By removing this 'attribute' from your document you will change
the meaning of those elements and attributes in your document and you
won't be able to unmarshall or validate your xml document any more.
(unless you remove the namespace for there as well)
If you still want to do this, you can probably extend the
javax.xml.streamXMLStreamWriter, overwrite the writeNamespace and
writeDefaultNamespace methods and marshall your objects using your
special writer marshal(element, writer).
[1]
http://www.rpbourret.com/xml/NamespacesFAQ.htm#ns_1
Regards,
Edwin
--
http://www.edankert.com/