public static void printNode(Node node,Writer pw) throws IOException {
  printNode(node,new StreamResult(pw));
  pw.write('\n');
  pw.flush();
}

public static void printNode ( Node node , Writer pw ) throws IOException { printNode ( node , new StreamResult ( pw ) ) ; pw . write ( '\n' ) ; pw . flush ( ) ; }
serializes an xml node to a writer .
