/** * This is used to create an <code>OutputNode</code> that can be * used to write a well formed XML document. The writer specified * will have XML elements, attributes, and text written to it as * output nodes are created and populated. * * @param result this contains the result of the generated XML * * @throws Exception this is thrown if there is an I/O error */ public static OutputNode write(Writer result) throws Exception { return write(result, new Format()); }
/** * This is used to create an <code>OutputNode</code> that can be * used to write a well formed XML document. The writer specified * will have XML elements, attributes, and text written to it as * output nodes are created and populated. * * @param result this contains the result of the generated XML * * @throws Exception this is thrown if there is an I/O error */ public static OutputNode write(Writer result) throws Exception { return write(result, new Format()); }
/** * This is used to create an <code>OutputNode</code> that can be * used to write a well formed XML document. The writer specified * will have XML elements, attributes, and text written to it as * output nodes are created and populated. * * @param result this contains the result of the generated XML * * @throws Exception this is thrown if there is an I/O error */ public static OutputNode write(Writer result) throws Exception { return write(result, new Format()); }
/** * This <code>write</code> method will traverse the provided object * checking for field annotations in order to compose the XML data. * This uses the <code>getClass</code> method on the object to * determine the class file that will be used to compose the schema. * If there is no <code>Root</code> annotation for the class then * this will throw an exception. The root annotation is the only * annotation required for an object to be serialized. * * @param source this is the object that is to be serialized * @param out this is where the serialized XML is written to * * @throws Exception if the schema for the object is not valid */ public void write(Object source, Writer out) throws Exception { write(source, NodeBuilder.write(out, format)); } }
/** * This <code>write</code> method will traverse the provided object * checking for field annotations in order to compose the XML data. * This uses the <code>getClass</code> method on the object to * determine the class file that will be used to compose the schema. * If there is no <code>Root</code> annotation for the class then * this will throw an exception. The root annotation is the only * annotation required for an object to be serialized. * * @param source this is the object that is to be serialized * @param out this is where the serialized XML is written to * * @throws Exception if the schema for the object is not valid */ public void write(Object source, Writer out) throws Exception { write(source, NodeBuilder.write(out, format)); } }
/** * This <code>write</code> method will traverse the provided object * checking for field annotations in order to compose the XML data. * This uses the <code>getClass</code> method on the object to * determine the class file that will be used to compose the schema. * If there is no <code>Root</code> annotation for the class then * this will throw an exception. The root annotation is the only * annotation required for an object to be serialized. * * @param source this is the object that is to be serialized * @param out this is where the serialized XML is written to * * @throws Exception if the schema for the object is not valid */ public void write(Object source, Writer out) throws Exception { write(source, NodeBuilder.write(out, format)); } }