Robert Oschler wrote:
Property? The nodeValue. For a text node element the text is stored in the
nodeValue property. I'm just trying to find a way to either get a
collection of only text nodes, so I can scan their nodeValue's, or anything
that saves me from traversing the whole DOM tree.
Mozilla could do it using its XPath on HTML implementation, Mozilla and
Opera 8 should be able to do it using a TreeWalker, and Opera 8 also
implements NodeIterator
(<http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html>). So
with those browsers you have options to look only at text nodes if needed.
IE does not have any W3C DOM Level 2 traversal but it has an
implementation of text searching within text ranges and then you can
expand the range to the parent element.
--
Martin Honnen
http://JavaScript.FAQTs.com/