ev*********@gmail.com wrote:
Sorry for typo .. the second method refers
getElementsByTagNameNS("*",<tagname>)
The prefix does not matter, the namespace URI is what matters, and the
local name, see
<http://www.w3.org/TR/DOM-Level-2-Core/core.html#i-Document>
so all you need to know is the namespace URI of the elements you are
looking for (e.g.
http://www.w3.org/1999/xhtml for XHTML elements) and
the local name (e.g. p for paragraph elements) then
document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "p")
will give you all XHTML <p> elements, whether they are written as
<p xmlns="http://www.w3.org/1999/xhtml">
or
<pf1:p xmlns:pf1="http://www.w3.org/1999/xhtml">
in the markup does not matter.
--
Martin Honnen
http://JavaScript.FAQTs.com/