DOM-Scripting & CSS - Styling Individual Character

Does anyone know how to use DOM Scripting & CSS to style individual characters?

If I have

[xyzxyzxyzxyz]

and I want all x’s to be underlined, all y’s to be green, and all z’s to be bold, how can I do this without applying a class or id to each character?