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. 
 

Reply via email to