Other than opennig a Jira issue at http://jira.codehaus.org/browse/CASTOR, and ask us to provide those methods, no ... ;-). As I have added the one for Writer myself a few eeks ago, it should not be too hard .... but as always, patches would be welcome ... ;-).
Werner PS Re: static marshal() methods .. I think they have been added for convenience reasons ... and somehow I wish that didn't happen myself .. ;-). -----Ursprüngliche Nachricht----- Von: Andy Buckley [mailto:[EMAIL PROTECTED] Gesendet: Montag, 11. Dezember 2006 14:38 An: [email protected] Betreff: [castor-user] Set Marshaller sink after construction? I noticed today that there are several static marshall(...) methods on the Marshaller class, for org.xml.sax.ContentHandler, org.xml.sax.DocumentHandler, org.w3c.dom.Node and java.io.Writer sinks. However, there's only one non-static method (which I need because I'm using a mapping file), and I can't see any "set" methods on Marshaller for sink types other than java.io.Writer: it looks like you have to use the appropriate constructor for that. I'm using a factory to make (un)marshallers with my correct mapping, and so it's better for me to be able to set the sink after construction: is there some way I can do that? Thanks, Andy PS. Incidentally, I didn't notice at first that the Marshaller.marshall(Object, Writer) method was static and was trying to call it as an object method. I was surprised to find that it worked, but of course got the mapping wrong which in my case produced enormous (80Mb) XML output! This is the nastiest feature of Java I've seen so far: why would they do such a thing?!? -- Andy Buckley: CEDAR @ IPPP, Durham Work: www.cedar.ac.uk www.insectnation.org --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email

