本文整理了Java中org.apache.axiom.om.OMNode.serialize()
方法的一些代码示例,展示了OMNode.serialize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OMNode.serialize()
方法的具体详情如下:
包路径:org.apache.axiom.om.OMNode
类名称:OMNode
方法名:serialize
暂无
代码示例来源:origin: org.apache.abdera/abdera-parser
protected String getInternalValue() {
try {
StringWriter out = new StringWriter();
XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(out);
writer.writeStartElement("");
for (Iterator<?> nodes = this.getChildren(); nodes.hasNext();) {
OMNode node = (OMNode)nodes.next();
node.serialize(writer);
}
writer.writeEndElement();
return out.getBuffer().toString().substring(2);
} catch (Exception e) {
}
return "";
}
代码示例来源:origin: org.apache.ws.commons.axiom/axiom-api
/**
* @deprecated This is an internal method that is no longer used.
*/
public static void serializeNormal
(OMElement
element, XMLStreamWriter writer, boolean cache)
throws XMLStreamException {
if (cache) {
element.build();
}
serializeStartpart(element, writer);
OMNode firstChild = element.getFirstOMChild();
if (firstChild != null) {
if (cache) {
(firstChild).serialize(writer);
} else {
(firstChild).serializeAndConsume(writer);
}
}
serializeEndpart(writer);
}
代码示例来源:origin: wso2/wso2-synapse
public void testLargeFile() throws Exception {
Registry reg = new SimpleURLRegistry();
Properties props = new Properties();
props.put("root", "file:./");
props.put("cachableDuration", "1500");
reg.init(props);
OMNode node = reg.lookup(FILE2);
node.serialize(new NullOutputStream());
}
内容来源于网络,如有侵权,请联系作者删除!