/* (non-Javadoc)
* @see org.w3c.dom.Node#getAttributes()
*/
@Override
public NamedNodeMap getAttributes() {
final NamedNodeMapImpl map = new NamedNodeMapImpl();
int attr = document.alpha[nodeNumber];
if( -1 < attr ) {
while( ( attr < document.nextAttr ) && ( document.attrParent[attr] == nodeNumber ) ) {
map.add( new AttributeImpl( document, attr ) );
++attr;
}
}
// add namespace declarations attached to this element
int ns = document.alphaLen[nodeNumber];
if( ns < 0 ) {
return( map );
}
while( ( ns < document.nextNamespace ) && ( document.namespaceParent[ns] == nodeNumber ) ) {
final NamespaceNode node = new NamespaceNode( document, ns );
map.add( node );
++ns;
}
return( map );
}