本文整理了Java中nu.xom.Element.setNamespaceURI()
方法的一些代码示例,展示了Element.setNamespaceURI()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.setNamespaceURI()
方法的具体详情如下:
包路径:nu.xom.Element
类名称:Element
方法名:setNamespaceURI
暂无
代码示例来源:origin: resteasy/Resteasy
public static byte[] createPermissionsXml(Permission... permissions) {
final Element permissionsElement = new Element("permissions");
permissionsElement.setNamespaceURI("http://xmlns.jcp.org/xml/ns/javaee");
permissionsElement.addAttribute(new Attribute("version", "7"));
for (Permission permission : permissions) {
代码示例来源:origin: org.xml-cml/cmlxom
/** override setNamespaceURI(String namespaceURI) to make it immutable.
* if namespaceURI is not set, sets it, else no-op
* @param namespaceURI
*/
public void setNamespaceURI(String namespaceURI) {
String nURI = this.getNamespaceURI();
if (nURI == null) {
super.setNamespaceURI(namespaceURI);
}
}
代码示例来源:origin: zanata/zanata-platform
/**
* Supported children are currently {@code <prop>} and {@code <note>}.
*
* @param child
* @param childrenXml
*/
private static void addChildIfSupported(Element child,
Builder<String> childrenXml) {
String uri = child.getNamespaceURI();
String name = child.getLocalName();
if (inTmxNamespace(uri)
&& (name.equals("prop") || name.equals("note"))) {
Element copy = (Element) child.copy();
copy.setNamespacePrefix("");
copy.setNamespaceURI("");
childrenXml.add(copy.toXML());
}
}
代码示例来源:origin: wildfly/wildfly-core
public static byte[] createPermissionsXml(Permission... permissions) {
final Element permissionsElement = new Element("permissions");
permissionsElement.setNamespaceURI("http://xmlns.jcp.org/xml/ns/javaee");
permissionsElement.addAttribute(new Attribute("version", "7"));
for (Permission permission : permissions) {
代码示例来源:origin: org.wildfly/wildfly-testsuite-shared
public static Asset createPermissionsXmlAsset(Permission... permissions) {
final Element permissionsElement = new Element("permissions");
permissionsElement.setNamespaceURI("http://xmlns.jcp.org/xml/ns/javaee");
permissionsElement.addAttribute(new Attribute("version", "7"));
for (Permission permission : permissions) {
内容来源于网络,如有侵权,请联系作者删除!