Hi! I am new to jibx and have a simple question: What is the preferred way to write a DOCTYPE to a marshalled document?
After playing around I came up with the following source: IMarshallingContext mctx = getBindingFactory().createMarshallingContext(); mctx.setIndent(4); FileOutputStream os = new FileOutputStream(file); mctx.startDocument("UTF-8", null, os); ctx.getXmlWriter().writeDocType("ejb-jar", "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd", "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN", null); ((IMarshallable) ejbjar).marshal(mctx); mctx.endDocument(); os.close(); The result is: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd" <ejb-jar id="ejb-jar_ID"> (Please note the missing > at the end of the DOCTYPE declaration.) Is this a bug in my code or in the XMLWriterBase class? Thank you for help! Kai ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users