Re: text nodes and element nodes

An element has no nodeValue. You have to navigate down one more level, to
the element's children -- which, for your SESSIONID and COMMUNITYID tags,
will be a single Text node whose value is the string you're looking for.


DOM Level 2's Range and Traversal chapters may be useful in gathering
larger chunks of text. In particular, I believe Range has an operation that
retrieves all text within that Range. But that does require creating and
using another object.

"Text Node Amelioration" (generally, gathering the text contained in a
subtree) is an open issue for DOM Level 3 and later. There are some
disagreements about how much more is needed, and exactly how it should
behave.

______________________________________
Joe Kesselman  / IBM Research

Received on Monday, 10 April 2000 19:07:45 UTC