Thanks for your response guys:
NogDog:
"Will there always be just one instance of "(b)text(/b)", or could there be multiples, or none?"
There could be one to several or none.
roscor: about using , (commas); interesting idea, but it would require the user to write the commas manually in the textarea, and if there were to be any other commas in the text, well...
Maybe I should have pointed this out: the idea is to create a "BB" style CMS (or whatever they are called). I'm using XML so I need to identify what is going to be a textNode and what is going to be an "ordinary" node (e.g. a bold node).
As far as I now you can't sentence a string to "DOM", so instead I need to separate the different string sections, and identify them one by one. And nothing else seem to come to mind except explode and/or RegEx...