/** * Creates a new XMLSerializer object. * @param doc Document to be serialized */ public XMLSerializer(Document doc) { this.doc = doc; // define the format for the xml document format = new OutputFormat(); setIndent(DEF_INDENT_SIZE); setLineSeparator(DEF_LINE_SEP); setLineWidth(DEF_LINE_WIDTH); // document serialization and writing factory = SerializerFactory.getSerializerFactory(Method.XML); }
fSerializerFactory = SerializerFactory.getSerializerFactory(Method.XML);