I'm using JiBX to implement a protocol in which there can be customized
elements, and I would like to discard those elements. The elements name
are known but their namespace is not.
I have used the DiscardListMapper with success but this has the
side-effect that any unknown element woul be discarded.
Is there a way I could map the "UnwantedElement"s? Putting them in a
collection is acceptable.
Thanks,
Ørjan
Example XML:
<Message xmlns="protocol-namespace">
<Foo>...</Foo>
<Bar>...</Bar>
<UnwantedElement xmlns="???">
</UnwantedElement>
<UnwantedElement xmlns="???">
</UnwantedElement>
</Message>
Example binding:
<binding>
<mapping name="Message" class="Message">
<namespace uri="protocol-namespace" defaults="elements"/>
<structure name="Foo" field="foo">...</structure>
<structure name="Bar" field="bar">...</structure>
<structure usage="optional" get-method="getIgnored"
set-method="setIgnored"
marshaller="org.jibx.extras.DiscardListMapper"
unmarshaller="org.jibx.extras.DiscardListMapper"/>
</mapping>
</binding>
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users