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