public boolean createXML(Writer writer){
  try {
    m_printData.createXML(new StreamResult(writer));
    writer.flush();
    writer.close();
    return true;
  }
 catch (  Exception e) {
    log.log(Level.SEVERE,"(w)",e);
  }
  return false;
}

public boolean createXML ( Writer writer ) { try { m_printData . createXML ( new StreamResult ( writer ) ) ; writer . flush ( ) ; writer . close ( ) ; return true ; } catch ( Exception e ) { log . log ( Level . SEVERE , "(w)" , e ) ; } return false ; }
write xml to writer
