users@jaxb.java.net

RE: Supressing namespace in elements when marshalling

From: Lulseged Zerfu <lulseged.zerfu_at_ericsson.com>
Date: Tue, 4 Nov 2008 08:34:19 +0100

Hi

 I just had the same question and saw one example shiped with the jaxb
2.1.9 which has helped me a lot.

 See under samples/namespace-prefix.

Lulseged

-----Original Message-----
From: gfiehler [mailto:gfiehler_at_yahoo.com]
Sent: den 4 november 2008 02:33
To: users_at_jaxb.dev.java.net
Subject: Supressing namespace in elements when marshalling


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