Esempio n. 1
0
 /** 按照XML格式将一个XmlNode写入到指定的OutputStream中. */
 public void writeTo(OutputStream out) throws IOException {
   Node node = toDOM();
   if (node != null) {
     DOMWriter dw = new DOMWriter(new OutputStreamWriter(out));
     dw.writeNode(toDOM());
     dw.flush();
   }
 }
Esempio n. 2
0
 /** 按照XML格式将一个XmlNode写入到指定的Writer中. */
 public void writeTo(Writer out) throws IOException {
   Node node = toDOM();
   if (node != null) {
     DOMWriter dw = new DOMWriter(out);
     dw.writeNode(toDOM());
     dw.flush();
   }
 }