Package org.apache.axiom.om.util
Class ElementHelper
java.lang.Object
org.apache.axiom.om.util.ElementHelper
Helper class to provide extra utility stuff against elements. The code is designed to work with
any element implementation.
-
Constructor Summary
ConstructorsConstructorDescriptionElementHelper(org.apache.axiom.om.OMElement element) Constructs and binds to an element. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.axiom.om.OMElementgetChildWithName(org.apache.axiom.om.OMElement parent, String childName) Deprecated.please use OMElement.getFirstChildWithName(qname) instead!static StringgetContentID(XMLStreamReader parser) static StringgetContentID(XMLStreamReader parser, String charsetEncoding) Deprecated.usegetContentID(XMLStreamReader)instead (see AXIOM-129)static StringgetContentIDFromHref(String href) Extract the content ID from a href attribute value, i.e. from a URI following the cid: scheme defined by RFC2392.static ReadergetTextAsStream(org.apache.axiom.om.OMElement element, boolean cache) Deprecated.UseOMElement.getTextAsStream(boolean)instead.static org.apache.axiom.om.OMElementimportOMElement(org.apache.axiom.om.OMElement omElement, org.apache.axiom.om.OMFactory omFactory) Deprecated.UseOMFactory.importInformationItem(OMInformationItem)instead.resolveQName(String qname) Deprecated.The algorithm used by this method is incorrect.resolveQName(String qname, boolean defaultToParentNameSpace) Deprecated.The algorithm used by this method is incorrect.static voidsetNewElement(org.apache.axiom.om.OMElement parent, org.apache.axiom.om.OMElement myElement, org.apache.axiom.om.OMElement newElement) Deprecated.static org.apache.axiom.soap.SOAPHeaderBlocktoSOAPHeaderBlock(org.apache.axiom.om.OMElement omElement, org.apache.axiom.soap.SOAPFactory factory) Deprecated.UseSOAPFactory.createSOAPHeaderBlock(OMElement)instead.static voidwriteTextTo(org.apache.axiom.om.OMElement element, Writer out, boolean cache) Deprecated.UseOMElement.writeTextTo(Writer, boolean)instead.
-
Constructor Details
-
ElementHelper
public ElementHelper(org.apache.axiom.om.OMElement element) Constructs and binds to an element.- Parameters:
element- element to work with
-
-
Method Details
-
resolveQName
Deprecated.The algorithm used by this method is incorrect. See AXIOM-356 for more details. -
resolveQName
Deprecated.The algorithm used by this method is incorrect. See AXIOM-356 for more details. -
setNewElement
public static void setNewElement(org.apache.axiom.om.OMElement parent, org.apache.axiom.om.OMElement myElement, org.apache.axiom.om.OMElement newElement) Deprecated. -
getChildWithName
public static org.apache.axiom.om.OMElement getChildWithName(org.apache.axiom.om.OMElement parent, String childName) Deprecated.please use OMElement.getFirstChildWithName(qname) instead! -
getContentID
Deprecated.usegetContentID(XMLStreamReader)instead (see AXIOM-129) -
getContentID
-
getContentIDFromHref
Extract the content ID from a href attribute value, i.e. from a URI following the cid: scheme defined by RFC2392.- Parameters:
href- the value of the href attribute- Returns:
- the corresponding content ID
-
importOMElement
public static org.apache.axiom.om.OMElement importOMElement(org.apache.axiom.om.OMElement omElement, org.apache.axiom.om.OMFactory omFactory) Deprecated.UseOMFactory.importInformationItem(OMInformationItem)instead.Some times two OMElements needs to be added to the same object tree. But in Axiom, a single tree should always contain object created from the same type of factory (eg: LinkedListImplFactory, DOMFactory, etc.,). If one OMElement is created from a different factory than that of the factory which was used to create the object in the existing tree, we need to convert the new OMElement to match to the factory of existing object tree. This method will convert omElement to the given omFactory.- See Also:
-
toSOAPHeaderBlock
public static org.apache.axiom.soap.SOAPHeaderBlock toSOAPHeaderBlock(org.apache.axiom.om.OMElement omElement, org.apache.axiom.soap.SOAPFactory factory) throws Exception Deprecated.UseSOAPFactory.createSOAPHeaderBlock(OMElement)instead.This is a method to convert regular OMElements to SOAPHeaderBlocks.- Parameters:
omElement-factory-- Returns:
- TODO
- Throws:
Exception
-
getTextAsStream
Deprecated.UseOMElement.getTextAsStream(boolean)instead. -
writeTextTo
public static void writeTextTo(org.apache.axiom.om.OMElement element, Writer out, boolean cache) throws XMLStreamException, IOException Deprecated.UseOMElement.writeTextTo(Writer, boolean)instead.- Throws:
XMLStreamExceptionIOException
-