I need to parse something like this
<o:address>My address</o:address>
that seems easy, but this element could come as follows
<o:address p:nil="true" />
How can I add a non-required attribute to a primitive, or in this case to a String object?
If there is no way, any suggestions of how could I handle this parsing?
I have no access to the model, I just receive the XML
You can set
required = false
in your annotations. To set an attribute optional, use