org.eclipse.pde.internal.core.XMLPrintHandler.printNode()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(78)

本文整理了Java中org.eclipse.pde.internal.core.XMLPrintHandler.printNode()方法的一些代码示例,展示了XMLPrintHandler.printNode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLPrintHandler.printNode()方法的具体详情如下:
包路径:org.eclipse.pde.internal.core.XMLPrintHandler
类名称:XMLPrintHandler
方法名:printNode

XMLPrintHandler.printNode介绍

暂无

代码示例

代码示例来源:origin: org.eclipse/org.eclipse.pde.core

public static void writeFile(Document doc, File file) throws IOException {
  Writer writer = null;
  OutputStream out = null;
  try {
    out = new FileOutputStream(file);
    writer = new OutputStreamWriter(out, "UTF-8"); //$NON-NLS-1$
    XMLPrintHandler.printNode(writer, doc, "UTF-8", ""); //$NON-NLS-1$ //$NON-NLS-2$
  } finally {
    try {
      if (writer != null)
        writer.close();
    } catch (IOException e1) {
    }
    try {
      if (out != null)
        out.close();
    } catch (IOException e1) {
    }
  }
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core

public static void writeFile(Document doc, File file) throws IOException {
  Writer writer = null;
  OutputStream out = null;
  try {
    out = new FileOutputStream(file);
    writer = new OutputStreamWriter(out, "UTF-8"); //$NON-NLS-1$
    XMLPrintHandler.printNode(writer, doc, "UTF-8", ""); //$NON-NLS-1$ //$NON-NLS-2$
  } finally {
    try {
      if (writer != null)
        writer.close();
    } catch (IOException e1) {
    }
    try {
      if (out != null)
        out.close();
    } catch (IOException e1) {
    }
  }
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core

case Node.DOCUMENT_NODE : {
  printHead(xmlWriter, encoding);
  printNode(xmlWriter, ((Document) node).getDocumentElement(), encoding, indent);
  break;
    printNode(xmlWriter, childNodes.item(i), encoding, indent + "\t"); //$NON-NLS-1$

代码示例来源:origin: org.eclipse/org.eclipse.pde.core

case Node.DOCUMENT_NODE: {
  printHead(xmlWriter,encoding);
  printNode(xmlWriter, ((Document) node).getDocumentElement(),encoding, indent);
  break;
    printNode(xmlWriter, childNodes.item(i),encoding, indent + "\t"); //$NON-NLS-1$

相关文章