private Document parse(final String data){
  if (docBuilder == null || data == null) {
    return null;
  }
  Document document=null;
  try {
    String buf=BEGINPART + data + ENDPART;
    InputSource inputSource=new InputSource(new StringReader(buf));
    document=docBuilder.parse(inputSource);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return document;
}

private Document parse ( final String data ) { if ( docBuilder == null || data == null ) { return null ; } Document document = null ; try { String buf = BEGINPART + data + ENDPART ; InputSource inputSource = new InputSource ( new StringReader ( buf ) ) ; document = docBuilder . parse ( inputSource ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } return document ; }
converts the loggingevent data in xml string format into an actual xml document class instance .
