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?

Hi,

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='http://www.foo.com' listSchemeURI='http://www.foo.com'>
                            USA
                            </CountryCode>

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"?

Thanks!
--Polly
-- 
View this message in context: http://www.nabble.com/How-to-get-MOXy-to-trim-the-text-values--tp17653021p17653021.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top