JAXB is not a good choice for human audiences. There are marshalling
options, but you will find it to be an uphill struggle to get detailed
control.
On the other hand, XML is in general a miserable format for humans.
You'll need to learn about com.sun.xml.bind.defaultNamespaceRemap and
com.sun.xml.internal.bind.namespacePrefixMapper.
On Mon, Nov 3, 2008 at 8:32 PM, gfiehler <gfiehler_at_yahoo.com> wrote:
>
> I am trying JAXB for the first time and the output of my XML has the xmlns:..
> in every element. This makes the XML virtually unreadable. This XML will be
> viewed by actual humans so it is necessary that the output is as simple and
> efficient as possible. How can I suppress the namespace as well as
> xsi:type..
>
> I am getting
>
> <Environment xsi:type="xs:string"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">TEST</Environment>
>
> but would like
> <Environment>TEST</Environment>
>
>
> any ideas would be greatly appreciated.
> --
> View this message in context: http://www.nabble.com/Supressing-namespace-in-elements-when-marshalling-tp20314654p20314654.html
> Sent from the java.net - jaxb users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>