W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2013

Re: Native DOM way to get nodes of arbitrary type/name

From: Marat Tanalin <mtanalin@yandex.ru>
Date: Sat, 05 Oct 2013 16:11:19 +0400
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: "www-dom@w3.org" <www-dom@w3.org>
Message-Id: <57291380975079@web14g.yandex.ru>
05.10.2013, 14:12, "Bjoern Hoehrmann" <derhoermi@gmx.net>:
> * Marat Tanalin wrote:
>
>> It would be nice to have a native (usable and performant) DOM way for
>> retrieving DOM nodes by node type (or, alternatively, by node name).
>>
>> This could be represented by these two simple methods:
>>
>> šššš* element.getNodesByType(type) -- to get _all_ nodes
>> ššššššof specified type contained in the element
>> šššššš(like `element.getElementsByTagName('*')` for elements);
>
> Use XPath

Thank you for your attention, Bjoern.

My message is not about searching for an instantaneous existing solution (nor the mailing list is a forum for questions of such type).

My message is a proposal intended to improve the DOM standard in general and to make it more universal and consistent.

XPath is not DOM or a part of it.
XPath is not as intuitive/easy-to-use as DOM.
XPath involves parsing "selector" always.

Of course, XPath could still be utilized for polyfilling the proposed DOM features in older XPath-capable browsers.
Received on Saturday, 5 October 2013 12:11:47 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:21 UTC