-
-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@JacksonXmlText cannot retrieve a wrapped text from a valid XML #574
Comments
No, that's not how XML Text works -- you cannot arbitrarily claim to not parse XML elements and leave them as "general XML content". If there is element Put another way, You could bind it into
or
in which case contents would be read into |
Thanks for your clarifications and insights! I was able to resolve it by following your suggestion and reading the contents via |
@forceporquillo I am glad work-around works for you -- good luck! |
Given a POJO, I should be able to deserialize any element value from an XML element.
suppose, this object:
When deserializing a value from an XML element, note: that the value from that element is wrapped inside an XML element.
The expected value of
matchingGroups.getContent()
should be<test>1</test>
however, in my case it was empty.I am aware that the docs say:
Allows specifying that value of one property is to be serialized as "unwrapped" text, and not in an element.
I am using the 2.13.4 version. Is there a way how we can easily achieve retrieving a wrapped text from an XML element?
The text was updated successfully, but these errors were encountered: