org.sakaiproject.util.Xml.readDocument()方法的使用及代码示例

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

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

Xml.readDocument介绍

[英]Read a DOM Document from xml in a file.
[中]从文件中的xml读取DOM文档。

代码示例

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

/**
 * {@inheritDoc}
 */
public void register(File toolXmlFile)
{
  String path = toolXmlFile.getAbsolutePath();
  if (!path.endsWith(".xml"))
  {
    log.info("register: skipping non .xml file: " + path);
    return;
  }
  log.info("register: file: " + path);
  Document doc = Xml.readDocument(path);
  register(doc);
}

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

/**
 * @inheritDoc
 */
public void register(File toolXmlFile, ServletContext context)
{
  String path = toolXmlFile.getAbsolutePath();
  if (!path.endsWith(".xml"))
  {
    log.info("register: skiping non .xml file: " + path);
    return;
  }
  log.info("register: file: " + path);
  Document doc = Xml.readDocument(path);
  register(doc, context);
}

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

/**
 * @inheritDoc
 */
public List<Tool> parseTools(File toolXmlFile)
{
  if ( ! toolXmlFile.canRead() ) return null;
      String path = toolXmlFile.getAbsolutePath();
      if (!path.endsWith(".xml"))
      {
          log.info("register: skiping non .xml file: " + path);
          return null;
      }
      log.info("parse-file: " + path);
      Document doc = Xml.readDocument(path);
  if ( doc == null ) return null;
  return parseTools(doc);
}

代码示例来源:origin: org.sakaiproject.common/archive-impl2

Document doc = Xml.readDocument(fileName);
if (doc == null)

代码示例来源:origin: org.sakaiproject.common/archive-impl

Document doc = Xml.readDocument(fileName);
if (doc == null)

相关文章