Details
Description
I’ve written some JiBX / JDOM integration code (JDOMWriter.java) so that the XML marshalled from Java objects can be accessed as a JDOM Document instead of as a large String. Namespace handling is not yet complete, but it should be usable for most purposes.
Usage is as follows:
IBindingFactory bfact = BindingDirectory.getFactory(root, Example.class);
IMarshallingContext mctx = bfact.createMarshallingContext();
JDOMWriter jdomWriter = new JDOMWriter();
mctx.setXmlWriter(jdomWriter);
mctx.startDocument("UTF-8", null);
mctx.marshalDocument(example);
Document document = jdomWriter.getDocument();
Resolved issues and added code to build.