On Feb 17, 2008 3:48 PM, I wrote:
[earlier missive deleted]
>
> I realized that the string.replace function doesn't actually do
> anything to the string, so I have to assign b.replace to a variable
> and write that back, something like 'var c = b.replace...', then
> document.body.innerHTML = c.  That, though, writes the string back
> literally into the page, even when I replace &lt; with <, etc.

Actually, it doesn't - my mistake - it creates links properly.

> So, I'm going to do a document.evaluate to get all the text nodes I
> want, and then process them, replacing any citations to US reports
> with a document.createElement('a').

This, it turns out, although I think it would be more elegant, is
rather hard to do; I can't quite figure out how to insert a link
element inside a text node.

pw


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to