You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by st...@cyberspace.org on 2002/04/19 11:09:19 UTC

HTMLCollection id vs name

The apiDoc for HTMLCollection says:

public Node namedItem(java.lang.String name)
This method retrieves a Node using a name. It first searches for a Node with 
a matching id attribute. If it doesn't find one, it then searches for a Node with
a matching name attribute, but only on those elements that are allowed a name attribute.


But I found that with xerces1.4.4, this method returns null for
<form name="myf" />
but works right for 
<form id="myf" />

Is this a  bug or am I somewhere wrong?

st.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org