Alex Rivera | Logout

Java: JAXB and using char

Asked 2009-09-23T13:18:37.720
9

I'm working on a project with JAXB but I run into a small problem with JAXB and the char datatype.

char gender = 'M';

Translates after marshalling into:

<gender>77</gender>

So I think that char is mapped to integer, but I simply want to map it to a String. How can I do this? Is it even possible?

Edit
Report

1 Answer

2

First thing i got in my mind :)

String gender = "M";
answered 2009-09-23T16:47:29.250

Your Answer