Code example for Document

Methods: appendChild, createElement

0
    } catch (ParserConfigurationException e) {
      e.printStackTrace();
    } 
       
    // Insert Root Element 
    Element root = (Element) this._report.createElement("PostExPerformanceDiagnosticReport");
    this._report.appendChild(root);
  } 
   
  /* 
   * Print the report document to console 
   */ 
  public void printReport() { 
    XMLUtils.printDOM(this._report);
  } 
   
  /* 
   * Save the report document the specified report file 
   * @param reportfile : path of report file.  
   */ 
  public void saveReport(String filename) {