本文整理了Java中gov.nist.toolkit.utilities.xml.Util.mkElement()
方法的一些代码示例,展示了Util.mkElement()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.mkElement()
方法的具体详情如下:
包路径:gov.nist.toolkit.utilities.xml.Util
类名称:Util
方法名:mkElement
暂无
代码示例来源:origin: usnistgov/iheos-toolkit2
public static OMElement xmlizeHashMap(HashMap<String, ?> map) {
OMElement map_ele = OMAbstractFactory.getOMFactory().createOMElement("Map", null);
for (Iterator it=map.keySet().iterator(); it.hasNext(); ) {
String key = (String) it.next();
Object value = map.get(key);
OMElement item = mkElement("Item", null, map_ele);
mkElement("Key", key, item);
mkElement("Value", value.toString(), item);
}
return map_ele;
}
代码示例来源:origin: usnistgov/iheos-toolkit2
@Override
public OMElement add_name_value(OMElement parent, String name, OMElement value) {
OMNode val = value;
name = name.replaceAll(":", "");
OMElement ele = MetadataSupport.om_factory.createOMElement(name, null);
if (val == null)
val = MetadataSupport.om_factory.createOMElement("None", null);
else {
try {
// if (name.equals("InputMetadata")) {
// System.out.println("InputMetadata:\n" + new OMFormatter(value).toString());
// }
val = Util.deep_copy(value);
} catch (Exception e) {}
}
try {
ele.addChild(val);
}
catch (OMException e) {
Util.mkElement("Exception", "Exception writing log content\n" + OMFormatter.encodeAmp(ExceptionUtil.exception_details(e))
+ "\n" + new OMFormatter(value).toString(), ele);
}
parent.addChild(ele);
return ele;
}
内容来源于网络,如有侵权,请联系作者删除!