question: public void asXML ( final Writer w , final String encoding , final Pattern filter ) throws IOException { w . write ( "<?xml version=\"1.0\" encoding=\"" + encoding + "\" ?>" ) ; asXML ( w , filter ) ; }
target:  Alternative, but you are still required to specify the character set encoding in use by the writer.