Package org.apache.axiom.om.util
Class CopyUtils
java.lang.Object
org.apache.axiom.om.util.CopyUtils
CopyUtils provides static utility methods that are useful for creating a copy of
an OM/SOAPEnvelope tree.
During the expansion, the Source tree retains its shape
(OMSourcedElement nodes are not expanded).
The Target tree has nodes that retain the class identity of the source node. For
example, a SOAPFault in the source tree will have a SOAPFault in the target tree.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SOAPEnvelopecopy(SOAPEnvelope sourceEnv) Creates a copy of the source envelope.static voidreader2writer(XMLStreamReader reader, XMLStreamWriter writer) Simple utility that takes an XMLStreamReader and writes it to an XMLStreamWriter
-
Method Details
-
copy
Creates a copy of the source envelope. If there are OMSourcedElements in the source tree, similar MSourcedElements are used in the target tree.- Parameters:
sourceEnv-- Returns:
- targetEnv
-
reader2writer
public static void reader2writer(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException Simple utility that takes an XMLStreamReader and writes it to an XMLStreamWriter- Parameters:
reader-writer-- Throws:
XMLStreamException
-