On Tue, Sep 2, 2008 at 3:18 PM, Tim Gustafson <tjg@xxxxxxxxxxxx> wrote: > And then I tried looking at the textContent property of each node, but it > seems that higher-level nodes include all the text of their children nodes > (which is what the DOM documents say it should). But there doesn't appear > to be any way to know if the textContent you've got is for just one node, > or > for a whole bunch of nodes. Is there any way to figure that out, so that I > can adjust the textContent property of just the lowest-level nodes, rather > than mucking up the higher-level ones? <http://www.php.net/unsub.php> > if a node has children, then its not a leaf, so i imagine you could continue to traverse until you reach the leaf that actually has the address needing magical conversion.. also, for a performance increase, if you dont find a match at a high level, you could skip that entire sub-section of the tree; no need to go down to a leaf if you know theres no magic needed for the current branch :) -nathan