commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <>
Subject Re: [betwixt] How can I ignore certain instances?
Date Tue, 15 Feb 2005 21:06:25 GMT
On Tue, 2005-02-15 at 14:50, Christian Aust wrote:
> Hi,
> while writing XML from a large object tree, I'd like to ignore some 
> instances that don't need to get written out. I found that the method 
> ignoreElement(ElementDescriptor, Context) of AbstractBeanWriter simply 
> checks for emptyElements. Is there any other way to keep individual 
> instances from showing up in the XML? Some kind of strategy that I could 
> implement that would check each object against a "black list"? Kind regards,

your post has reminded me that this is something that's been needed for
a while now. the way that i'd see it working would be during the
introspection so that only certain links in the bean graph were followed
by the XMLIntrospector at introspection time. so for example, when
introspecting a double-linked tree getParent property could always be

(as opposed to wanting to ignore particular object instances as they are
encountered during the bind time traversal)

is this the kind of thing that would satisfy?

if so, then it would be very useful for you to consider the information
such a strategy would require to function in your case. (i've found it
best to build specifications from use cases.) 

- robert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message