in reply to Poor Man's XML?

If the tags don't nest, then it seems that you could get by with just start tags:

<stage right> Enter Juliet <speech Juliet> Romeo! Romeo! Where the heck are you! <audience> claps.

The content after each tag is delimited by the next tag or the EOF. You could decompose this format into its respective parts using, e.g.,

while (<>) { if (/^<(.+?)>(.*)$/i) { $tag = $1; $part{$tag} .= $2; } else { $part{$tag} .= $_; } }

-Mark