Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] [MOXy] empty string

Hi,

I have a situation where we need to distinguish between empty tags vs.
missing tags.  The rules are:

For all String types:
* If the XML has <description></description>, that is supposed to mean empty
string ("").
* If the XML has no "description" tag, that is supposed to mean null.
* And vice versa for marshalling.

I looked at the javadoc and found that I might need to set a NullPolicy:
http://www.eclipse.org/eclipselink/api/1.1/org/eclipse/persistence/oxm/mappings/nullpolicy/NullPolicy.html

I am still confused after reading the documentation though.  How do I tell
EclipseLink that empty string means empty tags?  

Thanks!
--Polly
-- 
View this message in context: http://www.nabble.com/-MOXy--empty-string-tp22665748p22665748.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top