public static void serializeByPullStream(OMElementImpl element, org.apache.axis2.om.impl.OMOutputImpl omOutput) throws XMLStreamException {
serializeByPullStream(element,omOutput,false);
}
public static void serializeByPullStream(OMElementImpl element, org.apache.axis2.om.impl.OMOutputImpl omOutput,boolean cache) throws XMLStreamException {
StreamingOMSerializer streamingOMSerializer = new StreamingOMSerializer();
if (cache){
streamingOMSerializer.serialize(element.getXMLStreamReader(),
omOutput);
}else{
XMLStreamReader xmlStreamReaderWithoutCaching = element.getXMLStreamReaderWithoutCaching();
streamingOMSerializer.serialize(xmlStreamReaderWithoutCaching,
omOutput);
}
}