Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] How to get MOXy to trim the text values?


I mapped a field in my Java class to an XPath like "ns1:CountryCode/text()".

I find that when the XML looks like this:
                            <CountryCode listID='' listAgencyID=''
listAgencyName='' listName='' listVersionID='' name='' languageID=''
listURI='' listSchemeURI=''>

The value that gets unmarshalled is "                            USA".  All
those spaces that were used for formatting are preserved.  Is there a way to
configure EclipseLink to trim the spaces on either end of the string and
just give me "USA"?

View this message in context:
Sent from the EclipseLink - Users mailing list archive at

Back to the top