Пример #1
0
 /**
  * 将HTML文档写入指定的输出流中
  *
  * @param out
  * @return void
  */
 public void write(OutputStream out) throws IOException {
   if (htmlDeclaration != null) {
     htmlDeclaration.write(out);
   }
   if (this.commentList != null) {
     for (HtmlNode n : commentList) {
       n.write(out);
     }
   }
   if (this.doctypeList != null) {
     for (HtmlNode n : doctypeList) {
       n.write(out);
     }
   }
   if (this.processingInstructionList != null) {
     for (HtmlNode n : processingInstructionList) {
       n.write(out);
     }
   }
   root.write(out);
 }