- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.codehaus.cargo.util.XmlUtils.saveXml()
方法的一些代码示例,展示了XmlUtils.saveXml()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlUtils.saveXml()
方法的具体详情如下:
包路径:org.codehaus.cargo.util.XmlUtils
类名称:XmlUtils
方法名:saveXml
[英]write the xml document to disk, rethrowing checked exceptions as runtime.
[中]将xml文档写入磁盘,并在运行时重新引用已检查的异常。
代码示例来源:origin: org.codehaus.cargo/cargo-core-api-util
/**
* {@inheritDoc}
*/
@Override
public void writeFile()
{
xmlUtil.saveXml(document, path);
}
代码示例来源:origin: codehaus-cargo/cargo
/**
* {@inheritDoc}
*/
@Override
public void writeFile()
{
xmlUtil.saveXml(document, path);
}
代码示例来源:origin: org.codehaus.cargo/cargo-core-container-weblogic
/**
* write the domain's config.xml to disk.
*
* @param configXml document to write to disk
*/
public void writeConfigXml(Document configXml)
{
String configFile = getConfigXmlPath();
xmlTool.saveXml(configXml, configFile);
}
代码示例来源:origin: codehaus-cargo/cargo
/**
* write the domain's config.xml to disk.
*
* @param configXml document to write to disk
*/
public void writeConfigXml(Document configXml)
{
String configFile = getConfigXmlPath();
xmlTool.saveXml(configXml, configFile);
}
代码示例来源:origin: codehaus-cargo/cargo
/**
* write the domain's config.xml to disk.
*
* @param configXml document to write to disk
*/
public void writeConfigXml(Document configXml)
{
String configFile = getConfigXmlPath();
xmlTool.saveXml(configXml, configFile);
}
代码示例来源:origin: org.codehaus.cargo/cargo-core-container-weblogic
/**
* write the domain's config.xml to disk.
*
* @param configXml document to write to disk
*/
public void writeConfigXml(Document configXml)
{
String configFile = getConfigXmlPath();
xmlTool.saveXml(configXml, configFile);
}
代码示例来源:origin: org.codehaus.cargo/cargo-core-api-util
domUtils.saveXml(doc, file);
代码示例来源:origin: codehaus-cargo/cargo
domUtils.saveXml(doc, file);
代码示例来源:origin: codehaus-cargo/cargo
/**
* write the domain's config.xml to disk.
*
* @param configXml document to write to disk
*/
public void writeConfigXml(Document configXml)
{
XmlUtils xmlUtil = new XmlUtils(getFileHandler());
xmlUtil.saveXml(configXml, getFileHandler().append(getDomainHome(), "config.xml"));
}
代码示例来源:origin: org.codehaus.cargo/cargo-core-container-weblogic
/**
* write the domain's config.xml to disk.
*
* @param configXml document to write to disk
*/
public void writeConfigXml(Document configXml)
{
XmlUtils xmlUtil = new XmlUtils(getFileHandler());
xmlUtil.saveXml(configXml, getFileHandler().append(getDomainHome(), "config.xml"));
}
代码示例来源:origin: codehaus-cargo/cargo
/**
* Test that the file system manager can insert an XML element deep in the XML tree into a file.
* This also involves a lookup.
* @throws Exception If anything goes wrong
*/
public void testManagerCanInsertAnElementIntoFileThreeLevelsDeep() throws Exception
{
Document document = builder.newDocument();
Element application = document.createElement("Application");
document.appendChild(application);
Element foo = document.createElement("foo");
application.appendChild(foo);
Element bar = document.createElement("bar");
foo.appendChild(bar);
util.saveXml(document, TEST_FILE);
fileHandler.createFile(TEST_FILE);
manager.setFile(TEST_FILE);
manager.loadFile();
manager.insertElementsUnderXPath("<subnode property='hello' />", "//Application/foo/bar");
manager.writeFile();
String xml = fileHandler.readTextFile(TEST_FILE, "UTF-8");
XMLAssert.assertXpathEvaluatesTo("hello", "//Application/foo/bar/subnode/@property", xml);
}
代码示例来源:origin: codehaus-cargo/cargo
/**
* Test that the file system manager can insert an XML element with a namespace.
* @throws Exception If anything goes wrong
*/
public void testManagerCanInsertAnElementIntoFileWithNamespace() throws Exception
{
Document document = builder.newDocument();
Element domain = document.createElement("domain");
domain.setAttribute("xmlns", "http://www.bea.com/ns/weblogic/920/domain");
domain.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
domain.setAttribute("xsi:schemaLocation", "http://www.bea.com/ns/weblogic/920/domain "
+ "http://www.bea.com/ns/weblogic/920/domain.xsd");
document.appendChild(domain);
util.saveXml(document, TEST_FILE);
fileHandler.createFile(TEST_FILE);
manager.setNamespaces(namespaces);
manager.setFile(TEST_FILE);
manager.loadFile();
manager.insertElementsUnderXPath("<subnode property='hello' />", "//weblogic:domain");
manager.writeFile();
String xml = fileHandler.readTextFile(TEST_FILE, "UTF-8");
XMLAssert.assertXpathEvaluatesTo("hello", "//weblogic:domain/weblogic:subnode/@property",
xml);
}
代码示例来源:origin: codehaus-cargo/cargo
/**
* Test that the file system manager can insert an XML element into a file.
* @throws Exception If anything goes wrong
*/
public void testManagerCanInsertAnElementIntoFile() throws Exception
{
Document document = builder.newDocument();
Element application = document.createElement("Application");
document.appendChild(application);
util.saveXml(document, TEST_FILE);
fileHandler.createFile(TEST_FILE);
manager.setFile(TEST_FILE);
manager.loadFile();
manager.insertElementsUnderXPath("<subnode property='hello' />", "//Application");
manager.writeFile();
String xml = fileHandler.readTextFile(TEST_FILE, "UTF-8");
XMLAssert.assertXpathEvaluatesTo("hello", "//Application/subnode/@property", xml);
}
代码示例来源:origin: org.codehaus.cargo/cargo-core-container-tomcat
context.setAttribute("docBase", war.getFile());
configureExtraClasspath(war, context);
xmlUtil.saveXml(doc,
getFileHandler().append(contextDir, war.getContext() + ".xml"));
代码示例来源:origin: codehaus-cargo/cargo
context.setAttribute("docBase", war.getFile());
configureExtraClasspath(war, context);
xmlUtil.saveXml(doc,
getFileHandler().append(contextDir, war.getContext() + ".xml"));
尝试解析 xml 文件时,我总是遇到此错误。 重现它的简单脚本: doc <- xmlRoot(xmlTreeParse("http://www.stat.purdue.edu/~mdw/490M/c
本文整理了Java中org.codehaus.cargo.util.XmlUtils.saveXml()方法的一些代码示例,展示了XmlUtils.saveXml()的具体用法。这些代码示例主要来源于
我写了一个简短的 PHP 脚本来抓取现有的 XML 文件,找到一个节点并将其更改为新值。新值必须包装到 CDATA block 中。这工作正常,但是 <> 字符被替换为它们各自的 HTML 实体。这会
我正在使用 PHP 从网页中获取所有“脚本”标签,然后在 之后附加文本,该文本并不总是有效的 html。因为它并不总是有效的标记,所以我不能只使用 appendchild/replacechild
我有一部分 html 的结构不完整。示例: Some examples :-) STL is a library, not a framework.
我是一名优秀的程序员,十分优秀!