gpt4 book ai didi

org.codehaus.cargo.util.XmlUtils.loadXmlFromFile()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 22:44:40 25 4
gpt4 key购买 nike

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

XmlUtils.loadXmlFromFile介绍

[英]read the specified file into a Document.
[中]将指定的文件读入文档。

代码示例

代码示例来源:origin: org.codehaus.cargo/cargo-core-api-util

/**
 * {@inheritDoc}
 */
@Override
public Document loadFile()
{
  this.document = xmlUtil.loadXmlFromFile(path);
  return this.document;
}

代码示例来源:origin: codehaus-cargo/cargo

/**
 * {@inheritDoc}
 */
@Override
public Document loadFile()
{
  this.document = xmlUtil.loadXmlFromFile(path);
  return this.document;
}

代码示例来源:origin: org.codehaus.cargo/cargo-core-container-weblogic

/**
 * read the domain's config.xml file into a Document.
 * 
 * @return Document corresponding with config.xml
 */
public Document readConfigXml()
{
  String configFile = getConfigXmlPath();
  return xmlTool.loadXmlFromFile(configFile);
}

代码示例来源:origin: org.codehaus.cargo/cargo-core-container-weblogic

/**
 * read the domain's config.xml file into a Document.
 * 
 * @return Document corresponding with config.xml
 */
public Document readConfigXml()
{
  String configFile = getConfigXmlPath();
  return xmlTool.loadXmlFromFile(configFile);
}

代码示例来源:origin: codehaus-cargo/cargo

/**
 * read the domain's config.xml file into a Document.
 * 
 * @return Document corresponding with config.xml
 */
public Document readConfigXml()
{
  String configFile = getConfigXmlPath();
  return xmlTool.loadXmlFromFile(configFile);
}

代码示例来源:origin: codehaus-cargo/cargo

/**
 * read the domain's config.xml file into a Document.
 * 
 * @return Document corresponding with config.xml
 */
public Document readConfigXml()
{
  String configFile = getConfigXmlPath();
  return xmlTool.loadXmlFromFile(configFile);
}

代码示例来源:origin: codehaus-cargo/cargo

Document doc = domUtils.loadXmlFromFile(file);

代码示例来源:origin: org.codehaus.cargo/cargo-core-api-util

Document doc = domUtils.loadXmlFromFile(file);

代码示例来源:origin: codehaus-cargo/cargo

/**
 * {@inheritDoc} undeploys files by removing their configuration to the config.xml file of the
 * WebLogic server.
 */
@Override
public void undeploy(Deployable deployable)
{
  XmlUtils xmlUtil = new XmlUtils(getFileHandler());
  Document configXml =
    xmlUtil.loadXmlFromFile(getFileHandler().append(getDomainHome(), "config.xml"));
  List<Element> results = xmlUtil.selectElementsMatchingXPath("//Application[@Path='"
    + getFileHandler().getParent(getAbsolutePath(deployable)) + "']",
      configXml.getDocumentElement());
  for (Element element : results)
  {
    configXml.removeChild(element);
  }
  this.writeConfigXml(configXml);
}

代码示例来源:origin: org.codehaus.cargo/cargo-core-container-weblogic

/**
 * {@inheritDoc} undeploys files by removing their configuration to the config.xml file of the
 * WebLogic server.
 */
@Override
public void undeploy(Deployable deployable)
{
  XmlUtils xmlUtil = new XmlUtils(getFileHandler());
  Document configXml =
    xmlUtil.loadXmlFromFile(getFileHandler().append(getDomainHome(), "config.xml"));
  List<Element> results = xmlUtil.selectElementsMatchingXPath("//Application[@Path='"
    + getFileHandler().getParent(getAbsolutePath(deployable)) + "']",
      configXml.getDocumentElement());
  for (Element element : results)
  {
    configXml.removeChild(element);
  }
  this.writeConfigXml(configXml);
}

代码示例来源:origin: org.codehaus.cargo/cargo-core-container-weblogic

/**
 * {@inheritDoc} deploys files by adding their configuration to the config.xml file of the
 * WebLogic server.
 */
@Override
public void deploy(Deployable deployable)
{
  XmlUtils xmlUtil = new XmlUtils(getFileHandler());
  Document configXml =
    xmlUtil.loadXmlFromFile(getFileHandler().append(getDomainHome(), "config.xml"));
  Element domain = xmlUtil.selectElementMatchingXPath("//Domain",
    configXml.getDocumentElement());
  if (deployable.getType() == DeployableType.WAR)
  {
    addWarToDomain((WAR) deployable, domain);
  }
  else if (deployable.getType() == DeployableType.EAR)
  {
    addEarToDomain((EAR) deployable, domain);
  }
  else
  {
    throw new ContainerException("Not supported");
  }
  this.writeConfigXml(configXml);
}

代码示例来源:origin: codehaus-cargo/cargo

/**
 * {@inheritDoc} deploys files by adding their configuration to the config.xml file of the
 * WebLogic server.
 */
@Override
public void deploy(Deployable deployable)
{
  XmlUtils xmlUtil = new XmlUtils(getFileHandler());
  Document configXml =
    xmlUtil.loadXmlFromFile(getFileHandler().append(getDomainHome(), "config.xml"));
  Element domain = xmlUtil.selectElementMatchingXPath("//Domain",
    configXml.getDocumentElement());
  if (deployable.getType() == DeployableType.WAR)
  {
    addWarToDomain((WAR) deployable, domain);
  }
  else if (deployable.getType() == DeployableType.EAR)
  {
    addEarToDomain((EAR) deployable, domain);
  }
  else
  {
    throw new ContainerException("Not supported");
  }
  this.writeConfigXml(configXml);
}

代码示例来源:origin: org.codehaus.cargo/cargo-core-container-tomcat

xmlUtil.loadXmlFromFile(getFileHandler().append(war.getFile(),
    "META-INF/context.xml"));
Element context = (Element) doc.getDocumentElement();

代码示例来源:origin: codehaus-cargo/cargo

xmlUtil.loadXmlFromFile(getFileHandler().append(war.getFile(),
    "META-INF/context.xml"));
Element context = (Element) doc.getDocumentElement();

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