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

RE: Older Sibling?

From: Thomas Ashe <Thomas.Ashe@Blackbaud.com>
Date: Mon, 28 Feb 2000 18:07:47 -0500
Message-ID: <05325001EB71D311A4DD00E029347C268EA581@ntpd.blackbaud.com>
To: "'David Brownell'" <david-b@pacbell.net>
Cc: www-dom@w3.org
On Monday, February 28, 2000 5:50 PM, David Brownell
> Thomas Ashe wrote:
> > 
> > In looking through the DOM specs, I could not discern a way 
> to do the
> > following:
> > 
> > Given two nodes of a common parent, identify which node 
> precedes the other
> > in the parent's ChildNodes nodelist.
> > 
> > Is there such a creature in the current specs?
> You'd basically look at the nodelist yourself.  Takes a few lines
> of code -- would you seriously expect DOM to save you the work of
> writing such a simple subroutine?  If so, why?


DOM allows me to access a childNode directly by using the item(index) method
off of the nodelist that is returned from childNodes, rather than walking
the nodelist.

So, I was expecting that if I had the reference to the childNode, it would
have an index property that I would be able to use for routines like this,
rather than having to examine the nodelist itself.

Am I really expecting too much? :-)

Received on Monday, 28 February 2000 18:07:59 UTC

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