/** * Retrieves the string-value of an element node. This may be the empty string if the element is * empty, but must not be null. * * @param object the comment node. * @return Returns the string-value of the node. */ public String getElementStringValue(Object object) { if (isElement(object)) { return getStringValue((OMElement) object, new StringBuffer()) .toString(); } return null; }
/** * Retrieves an <code>Iterator</code> matching the <code>attribute</code> XPath axis. * * @param contextNode the original context node * @return Returns an Iterator capable of traversing the axis, not null. * @throws UnsupportedAxisException if the semantics of the attribute axis are not supported by * this object model */ public Iterator getAttributeAxisIterator(Object contextNode) throws UnsupportedAxisException { if (isElement(contextNode)) { return ((OMElement) contextNode).getAllAttributes(); } else { return JaxenConstants.EMPTY_ITERATOR; } }