code: public static void write(Node node, OutputStream outputStream)
      {
          OutputStreamWriter writer = new OutputStreamWriter(outputStream);
          write(node, writer, 4, false);
      }
docs: Writes a formatted String representation of the given XML node,
  including the XML declaration, to the given output stream.
  The caller is responsible for closing the given stream.
  
  @param node The node
  @param outputStream The output stream to write to
  @throws XmlException If there was an error while writing