gpt4 book ai didi

org.apache.openjpa.lib.xml.XMLFactory.getDOMParser()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 16:35:05 40 4
gpt4 key购买 nike

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

XMLFactory.getDOMParser介绍

[英]Return a DocumentBuilder with the specified configuration.
[中]返回具有指定配置的DocumentBuilder。

代码示例

代码示例来源:origin: org.apache.openjpa/openjpa-all

/**
 * Return a new DOM Document.
 */
public static Document getDocument() {
  return getDOMParser(false, false).newDocument();
}

代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa

/**
 * Return a new DOM Document.
 */
public static Document getDocument() {
  return getDOMParser(false, false).newDocument();
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

/**
 * Return a new DOM Document.
 */
public static Document getDocument() {
  return getDOMParser(false, false).newDocument();
}

代码示例来源:origin: org.apache.openjpa/openjpa-lib

/**
 * Return a new DOM Document.
 */
public static Document getDocument() {
  return getDOMParser(false, false).newDocument();
}

代码示例来源:origin: org.apache.openejb.patch/openjpa-jdbc

public List<String> getDictionaries(InputStream in) {
  List<String> result = new ArrayList<String>();
  DocumentBuilder builder = XMLFactory.getDOMParser(false, false);
  try {
    Document doc = builder.parse(in);
    Element root = doc.getDocumentElement();
    NodeList nodes = root.getElementsByTagName("dictionary");
    for (int i = 0; i < nodes.getLength(); i++) {
      Node node = nodes.item(i);
      NamedNodeMap attrs = node.getAttributes();
      Node dictionary = attrs.getNamedItem("class");
      if (dictionary != null) {
        result.add(dictionary.getNodeValue());
      }
    }
  } catch (Throwable e) {
    if (log.isWarnEnabled()) {
      log.error(_loc.get("error-code-parse-error"));
    }
  } finally {
    try {
      in.close();
    } catch (IOException e) {
      // ignore
    }
  }
  return result;
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

public List<String> getDictionaries(InputStream in) {
  List<String> result = new ArrayList<String>();
  DocumentBuilder builder = XMLFactory.getDOMParser(false, false);
  try {
    Document doc = builder.parse(in);
    Element root = doc.getDocumentElement();
    NodeList nodes = root.getElementsByTagName("dictionary");
    for (int i = 0; i < nodes.getLength(); i++) {
      Node node = nodes.item(i);
      NamedNodeMap attrs = node.getAttributes();
      Node dictionary = attrs.getNamedItem("class");
      if (dictionary != null) {
        result.add(dictionary.getNodeValue());
      }
    }
  } catch (Throwable e) {
    if (log.isWarnEnabled()) {
      log.error(_loc.get("error-code-parse-error"));
    }
  } finally {
    try {
      in.close();
    } catch (IOException e) {
      // ignore
    }
  }
  return result;
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

public List<String> getDictionaries(InputStream in) {
  List<String> result = new ArrayList<String>();
  DocumentBuilder builder = XMLFactory.getDOMParser(false, false);
  try {
    Document doc = builder.parse(in);
    Element root = doc.getDocumentElement();
    NodeList nodes = root.getElementsByTagName("dictionary");
    for (int i = 0; i < nodes.getLength(); i++) {
      Node node = nodes.item(i);
      NamedNodeMap attrs = node.getAttributes();
      Node dictionary = attrs.getNamedItem("class");
      if (dictionary != null) {
        result.add(dictionary.getNodeValue());
      }
    }
  } catch (Throwable e) {
    if (log.isWarnEnabled()) {
      log.error(_loc.get("error-code-parse-error"));
    }
  } finally {
    try {
      in.close();
    } catch (IOException e) {
      // ignore
    }
  }
  return result;
}

代码示例来源:origin: org.apache.openjpa/openjpa-jdbc

public List<String> getDictionaries(InputStream in) {
  List<String> result = new ArrayList<String>();
  DocumentBuilder builder = XMLFactory.getDOMParser(false, false);
  try {
    Document doc = builder.parse(in);
    Element root = doc.getDocumentElement();
    NodeList nodes = root.getElementsByTagName("dictionary");
    for (int i = 0; i < nodes.getLength(); i++) {
      Node node = nodes.item(i);
      NamedNodeMap attrs = node.getAttributes();
      Node dictionary = attrs.getNamedItem("class");
      if (dictionary != null) {
        result.add(dictionary.getNodeValue());
      }
    }
  } catch (Throwable e) {
    if (log.isWarnEnabled()) {
      log.error(_loc.get("error-code-parse-error"));
    }
  } finally {
    try {
      in.close();
    } catch (IOException e) {
      // ignore
    }
  }
  return result;
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

return;
log = dict.conf.getLog(JDBCConfiguration.LOG_JDBC);
DocumentBuilder builder = XMLFactory.getDOMParser(false, false);
try {
  Document doc = builder.parse(in);

代码示例来源:origin: org.apache.openjpa/openjpa-jdbc

return;
log = dict.conf.getLog(JDBCConfiguration.LOG_JDBC);
DocumentBuilder builder = XMLFactory.getDOMParser(false, false);
try {
  Document doc = builder.parse(in);

代码示例来源:origin: org.apache.openejb.patch/openjpa-jdbc

return;
log = dict.conf.getLog(JDBCConfiguration.LOG_JDBC);
DocumentBuilder builder = XMLFactory.getDOMParser(false, false);
try {
  Document doc = builder.parse(in);

代码示例来源:origin: org.apache.openejb.patch/openjpa

return;
log = dict.conf.getLog(JDBCConfiguration.LOG_JDBC);
DocumentBuilder builder = XMLFactory.getDOMParser(false, false);
try {
  Document doc = builder.parse(in);

40 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com