code: private void saveSummaryXml(SampleNode root) {
  
          root.sortTree();
          Document doc = DocumentHelper.createDocument();
          Element rootElem = doc.addElement("root");
          root.appendToXml(rootElem);
          OutputFormat outformat = OutputFormat.createPrettyPrint();
          ByteArrayOutputStream buffer = new ByteArrayOutputStream();
          outformat.setEncoding("UTF-8");
          try {
              XMLWriter writer = new XMLWriter(buffer, outformat);
              writer.write(doc);
              writer.flush();
              try (FileOutputStream fos = new FileOutputStream(m_summaryFilename)) {
                  fos.write(buffer.toByteArray());
              }
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
docs: Saves the stack trace summary tree starting from the given root node to an XML file.<p>
  
  @param root the root node