code: static public void displayNode(Node node) {
          try {
              TransformerFactory TF = TransformerFactory.newInstance();
                // Fortify Mod: disable external entity injection
              TF.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
              Transformer identity = TF.newTransformer();
  		   // End Fortify Mod
              identity.transform(new DOMSource(node),
                      new StreamResult(System.out));
          } catch (Exception ex) {
              System.out.println("ERROR: " + ex.getMessage());
          }
      }
docs: HELPER METHOD TO PRINT A DOM TO STDOUT