You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Greg Matthews <gm...@flex.com.au> on 2000/05/15 03:53:27 UTC
xerces-j 1.0.4 bug?
Dear all,
I just downloaded xerces-j 1.0.4 and wondered if this might be a bug?
under 1.0.3, the following worked.
OutputFormat outputFormat = new OutputFormat();
outputFormat.setOmitXMLDeclaration( true );
outputFormat.setIndenting( false );
outputFormat.setLineSeparator( "" );
org.apache.xml.serialize.XMLSerializer serializer = new XMLSerializer( System.out, outputFormat );
serializer.serialize( <someElement> );
i get the following error under 1.0.4
java.lang.IllegalStateException: SER002 No writer supplied for serializer
at org.apache.xml.serialize.BaseMarkupSerializer.serialize(BaseMarkupSerializer.java:389)
seems like a protected variable in BaseMarkupSerializer, _printer, is not initialised
unless prepare() gets called.
i'm calling asDocumentHandler() just so prepare() gets called although i ignore the
return value.
Am i using the serializer correctly?
thanks,
Greg.