org.exolab.castor.xml.Marshaller.declareNamespace()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(166)

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

Marshaller.declareNamespace介绍

[英]Declares the given namespace, if not already in scope
[中]声明给定的命名空间(如果尚未在作用域中)

代码示例

代码示例来源:origin: org.codehaus.castor/castor-xml

result = (prefix.length() != 0) ? prefix + ":" + result.substring(idx + 1)
  : result.substring(idx + 1);
declareNamespace(prefix, nsURI);
return result;

代码示例来源:origin: org.codehaus.castor/com.springsource.org.castor

prefix = DEFAULT_PREFIX+(++NAMESPACE_COUNTER);
result = (prefix.length() != 0)?prefix+":"+result.substring(idx+1):result.substring(idx+1);
declareNamespace(prefix, nsURI);
return result;

代码示例来源:origin: org.codehaus.castor/castor-xml

Object key = keys.nextElement();
   Object val = mapHandler.get(map, key);
   declareNamespace(key.toString(), val.toString());
 declareNamespace(prefix, namespace);
 qName = prefix + ':' + qName;
} else

代码示例来源:origin: org.codehaus.castor/com.springsource.org.castor

Object key = keys.nextElement();
    Object val = mapHandler.get(map, key);
    declareNamespace(key.toString(), val.toString());
declareNamespace(prefix, namespace);
qName = prefix + ':' + qName;

代码示例来源:origin: org.codehaus.castor/castor-xml

nsPrefix = DEFAULT_PREFIX + (++_namespaceCounter);
 declareNamespace(nsPrefix, nsURI);
} else {
 nsURI = "";
declareNamespace(XSI_PREFIX, XSI_NAMESPACE);
 if (namespacesStack.getNamespaceURI("java") == null) {
  declareNamespace("java", "http://java.sun.com");
declareNamespace(XSI_PREFIX, XSI_NAMESPACE);
   declareNamespace(XSI_PREFIX, XSI_NAMESPACE);
   atts.addAttribute(XSI_NAMESPACE, NIL_ATTR, XSI_NIL_ATTR, CDATA, TRUE_VALUE);

代码示例来源:origin: org.codehaus.castor/com.springsource.org.castor

declareNamespace(nsPrefix, nsURI);
declareNamespace(XSI_PREFIX, XSI_NAMESPACE);
declareNamespace(XSI_PREFIX, XSI_NAMESPACE);
      declareNamespace(XSI_PREFIX, XSI_NAMESPACE);
      atts.addAttribute(XSI_NAMESPACE, NIL_ATTR, XSI_NIL_ATTR, CDATA, TRUE_VALUE);

相关文章