public static String adoc(SolrInputDocument sdoc){
  StringWriter out=new StringWriter(512);
  try {
    out.append("<add>");
    ClientUtils.writeXML(sdoc,out);
    out.append("</add>");
  }
 catch (  IOException e) {
    throw new RuntimeException("Inexplicable IO error from StringWriter",e);
  }
  return out.toString();
}

public static String adoc ( SolrInputDocument sdoc ) { StringWriter out = new StringWriter ( 512 ) ; try { out . append ( "<add>" ) ; ClientUtils . writeXML ( sdoc , out ) ; out . append ( "</add>" ) ; } catch ( IOException e ) { throw new RuntimeException ( "Inexplicable IO error from StringWriter" , e ) ; } return out . toString ( ) ; }
generates a simple & lt ; add & gt ; & lt ; doc & gt ; . . . xml string with no options
