users@jaxb.java.net

single space field value

From: Simon Lee <simon.lee_at_DB.COM>
Date: Fri, 24 Jan 2003 19:28:50 -0700

Hi,

> I have a tagged value which is a single space.
> <GROUP> </GROUP>
> schema of GROUP is just (PCDATA)
>
> It seems that the default behaviour of my jaxb-utilised java program
> treat this single space as empty field when it unmarshal the xml in.
>
> When I marshal the xml out, I got the following back
> <GROUP/>
>
> Where can I look up more detail on how can I control this behaviour ?
>
> I have tried the xml:space attribute which the parser did not recognized.
> When I change the field to <GROUP>&#x0020</GROUP>, the parser complained
> Exception in thread "main" com.sun.xml.sp.ParseException:40: Illegal hexadecimal character reference
> at com.sun.xml.sp.Parser.fatal(Parser.java:2008)
> at com.sun.xml.sp.Parser.fatal(Parser.java:1993)
> at com.sun.xml.sp.Parser.parseCharNumber(Parser.java:1462)
> at com.sun.xml.sp.Parser.parseContent(Parser.java:2954)
> at com.sun.xml.sp.Parser.parse(Parser.java:2320)
> at com.sun.xml.sp.StreamingParserImpl.parse(StreamingParserImpl.java:102)
>
>Any one any idea ?
>
> Regards,
> Simon