RE: Older Sibling?

David Brownell wrote,
> would you seriously expect DOM to save you the work of
> writing such a simple subroutine?  If so, why?

How about: because some implementations might be able to
provide an O(1) implementation, whereas an external routine
would be likely to be O(number of siblings) or thereabouts.

There're several other queries like this which could usefully
be added and which might allow for similar optimizations:
precedes in document order; is an ancestor of; least common
ancestor; depth from root etc.

Cheers,


Miles

-- 
Miles Sabin                       Cromwell Media
Internet Systems Architect        5/6 Glenthorne Mews
+44 (0)20 8817 4030               London, W6 0LJ, England
msabin@cromwellmedia.com          http://www.cromwellmedia.com/

Received on Wednesday, 1 March 2000 06:13:38 UTC