/** * Returns the namespace URI of an element node. * * @param node * the element node * @return the namespace if the argument is an element, or null otherwise */ @Override public String getElementNamespaceUri( Object node ) { String ns = null; if ( isElement( node ) ) { ElementNode<?> el = (ElementNode<?>) node; ns = el.getNamespaceUri(); } return ns; }
/** * Returns the local name of an element node. * * @param node * the element node * @return a string representing the unqualified local name if the node is an element, or null otherwise */ @Override public String getElementName( Object node ) { String name = null; if ( isElement( node ) ) { ElementNode<?> el = (ElementNode<?>) node; name = el.getLocalName(); } return name; }
/** * Returns the qualified (=prefixed) name of an element node. * * @param node * the element node * @return a string representing the qualified (i.e. possibly prefixed) name if the argument is an element, or null * otherwise */ @Override public String getElementQName( Object node ) { String name = null; if ( isElement( node ) ) { ElementNode<?> el = (ElementNode<?>) node; name = el.getPrefixedName(); } return name; }