Serializer serializer = broker.getSerializer(  ); serializer.reset(  ); Map properties = new TreeMap(); properties.put(Serializer.PRETTY_PRINT, Boolean.toString(indent)); serializer.setProperties(properties);
Serializer serializer = broker.getSerializer(); serializer.reset();
    protected String printAll( NodeSet resultSet, int howmany, int start,                               long queryTime, boolean indent, String stylesheet                               ) {        if ( resultSet.getLength(  ) == 0 )            return formatErrorMsg( "nothing found!", OK );        Node n;        Node nn;        Element temp;        DocumentImpl owner;        if ( ( howmany > resultSet.getLength(  ) ) || ( howmany == 0 ) )            howmany = resultSet.getLength(  );        if ( ( start < 1 ) || ( start > resultSet.getLength(  ) ) )            return formatErrorMsg( "start parameter out of range", WRONG_REQUEST );        Serializer serializer = broker.getSerializer(  );        serializer.reset(  );        Map properties = new TreeMap();        properties.put(Serializer.PRETTY_PRINT, Boolean.toString(indent));        serializer.setProperties(properties);        if(stylesheet != null)        	serializer.setStylesheet( stylesheet );        try {            return serializer.serialize( (NodeSet) resultSet, start, howmany,                                         queryTime                                         );        } catch ( SAXException saxe ) {            HttpServer.LOG.warn( saxe );            return formatErrorMsg( "error while serializing xml: "                                   + saxe.toString(  ), OUTPUT_ERROR                                   );        }    }