On Jan 11, 2007, at 2:06 AM, Manu George wrote:
Hi, When the deployment descriptor entries are populated into the corresponding objects, the white spaces tabs newlines etc are not getting stripped off. Since JAXB is being used for population do we need to set some setting to strip whitespace eg using xs:token instead of xs:String in the schema? OR do we need to manually do it by calling trim when we populate the info objects?
Looks like we can use XmlAdapter (http://java.sun.com/javaee/5/docs/ api/javax/xml/bind/annotation/adapters/XmlAdapter.html). At first it looks like you have to set this on every String attribute, but according to this blog post you can set it at the package level:
http://weblogs.java.net/blog/kohsuke/archive/2005/09/using_jaxb_20s.html -dain
