Are you generating Java classes from an XML schema (Is it possible to
modify it?) or are you using hand coded Java classes?
-W
On Mon, May 3, 2010 at 3:26 PM, Steffen Bleul <stbleul_at_gmx.de> wrote:
> Hello,
>
> I have a question regarding JAXB customizing with JaxbAdapters.
>
> I have a field in my object with type Double, in my case its necessary that this Double needs to be formatted/marshalled in 3 differents formats inside the same XML.
>
> public Double value = ...;
>
> Double: 0.1233554233
> 1. Format, no commas: 0
> 2. Format, 3 digits after comma: 0.123
> 3. Format, 2 digits after comma: 0.12
>
> The resulting xml:
> <doubleFormatA>0</doubleFormatA>
> <doubleFormatB>0.123</doubleFormatB>
> <doubleFormatC>0.12</doubleFormatC>
>
> Whats the best approach to do this in JAXB?
>
> --
> ------------------------------------------------------------------
>
> Dipl.-Inf. Steffen Bleul
> Distributed Systems Group, University of Kassel
> Wilhelmshöher Allee 73, D-34121 Kassel, Germany
> Tel. : +49 (0)561 804 62 82
> Fax. : +49 (0)561 804 62 77
> Email: bleul_at_vs.uni-kassel.de
> Web : http://www.vs.uni-kassel.de/~bleul/
> ------------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>