First of all, your code refers to OMElementImpl
. You shouldn't do that. As the name of the class (and also the name of the package that contains that class) indicates, this is an implementation class that should not be used directly in application code. Anyways, the cast to OMElementImpl
is useless because the getText
method is defined by the OMElement
interface.
To answer the question, yes, OMElement
extends OMNode
, as you can see in the Javadoc:
http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMElement.html
As the name indicates, OMElement
represents an XML element. OMNode
on the other hand is implemented by all Axiom classes that represent an XML information item that can be a child of another information item (such as a comment, text node, processing instruction, etc.).