W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2002

method to return only the specificied child elements?

From: Paul Ekeland <pekeland@credm.com>
Date: Mon, 21 Jan 2002 10:48:55 +0100
To: <www-dom@w3.org>
Message-ID: <NFBBLBHOCLEPEHNCLEKLAEONCCAA.pekeland@credm.com>
Hello everyone,

I have discovered DOM fairly recently and I am trying to understand all the
subtilities of it. Forgive me if this question has already been answered in
the mailing list, but the search feature is not working currently on the
archives of the list.

Here is the question: how come there are no method that allows an Element to
get only the child elements specified by their tag name? The
getElementsByTagName() method returns all the descendant elements with that
tag name, so why is there not one that returns only the children with that
tag name? There are ways of course to bypass this (by checking the parent
node of the resulting list provided by getElementsByTagName() for
example,...), but I was wondering if I was not missing something. Thanks in
advance for any answer,

Paul
Received on Monday, 21 January 2002 04:47:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:55 GMT