> In Boerries's case you need also to escape < with < and > with > Gosh, I completely avoided answering his question, didn't I. That's what I get for writing email that late at night... Yes, I imagine setAttribute should do the escaping, too. -bob