A long long time ago I found Shakespeare in XML, by Jon Bosak, and I’ve quite literally carried it around with me ever since. If you’re not a programming geek you may not know the value of XML, so let me try to explain. XML is like a database inside a file – it is self describing of what’s in it. So instead of this:
Act 1, Scene 1
SCENE I. Elsinore. A platform before the castle.
FRANCISCO at his post. Enter to him BERNARDO
Who’s there? You get something more like this: <Act> <Title>Act 1</Title> <Scene> <Title>Scene 1</Title> <Stagedir>Elsinore. A platform before the castle … </Stagedir> <Speech> <Speaker> <Name>Bernardo</Name> </Speaker> <Line>Who’s there?</Line> </Speech> … Get the idea? So if you’re a code geek you look at that and start seeing the logic you can apply, like “In Act #3 how many lines are there in all of the speeches spoken by Hamlet?” and it’s quite literally one or two lines of code. Anyway, I never found the Sonnets in XML. There’s one or two out there as examples of how to do XML, but I never found the whole set of 154, and I wanted it. So I made it. It’s very basic, but it does what I need. If others find it useful and make enhancements I’d appreciate hearing about it. Enjoy!