PlayShakespeare.com: The Ultimate Free Shakespeare Resource
PlayShakespeare.com: The Ultimate Free Shakespeare Resource
PlayShakespeare.com: The Ultimate Free Shakespeare Resource
PlayShakespeare.com: The Ultimate Free Shakespeare Resource
Welcome, Guest
Username: Password: Remember me

TOPIC: Converting PlayShakespeare.com Editions to XML format

Converting PlayShakespeare.com Editions to XML format 7 years 9 months ago #2331

  • William Shakespeare
  • William Shakespeare's Avatar
  • Offline
  • Administrator
  • Posts: 732
  • Thank you received: 18
This thread is for sharing tips and tricks on how to convert a play to XML. It's actually quite easy, but takes some time. Read the news post here:

http://www.playshakespeare.com/news/3710-call-for-volunteers-to-help-convert-plays

If you're interested in taking on a single play, post here or email us here:

http://www.playshakespeare.com/contact

...and we'll help you get started. Below is an example of the XML structure.
<PLAY>
<TITLE>The Tragedy of Hamlet, Prince of Denmark</TITLE>
<PERSONAE>
<PERSTITLE>Dramatis Personae</PERSTITLE>
<PERSONA>Claudius, King of Denmark</PERSONA>
<PERSONA>Marcellus</PERSONA>
<PERSONA>Hamlet</PERSONA>
<PERSONA>Polonius</PERSONA>
<PERSONA>Horatio</PERSONA>
<PERSONA>Laertes</PERSONA>
<PERSONA>Voltemand</PERSONA>
<PERSONA>Cornelius</PERSONA>
<PERSONA>Rosencrantz</PERSONA>
<PERSONA>Guildenstern</PERSONA>
<PERSONA>Osric</PERSONA>
<PERSONA>A Gentleman</PERSONA>
<PERSONA>A Priest</PERSONA>
<PERSONA>Marcellus</PERSONA>
<PERSONA>Bernardo</PERSONA>
<PERSONA>Francisco</PERSONA>
<PERSONA>Reynaldo</PERSONA>
<PERSONA>Players</PERSONA>
<PERSONA>Two Clowns, gravediggers</PERSONA>
<PERSONA>Fortinbras</PERSONA>
<PERSONA>A Norwegian Captain</PERSONA>
<PERSONA>English Ambassadors</PERSONA>
<PERSONA>Getrude, Queen of Denmark</PERSONA>
<PERSONA>Ophelia</PERSONA>
<PERSONA>Ghost of Hamlet's Father</PERSONA>
<PERSONA>Lords, Ladies</PERSONA>
<PERSONA>Officers, Soldiers</PERSONA>
<PERSONA>Sailors</PERSONA>
<PERSONA>Messengers</PERSONA>
<PERSONA>Attendants</PERSONA>
</PERSONAE>

<ACT>
<ACTTITLE>ACT I</ACTTITLE>

<SCENE>
<SCENETITLE>SCENE 1</SCENETITLE>
<SCENELOCATION>Elsinore. A platform before the castle.</SCENELOCATION>
<SCENEPERSONAE>(Barnardo, Francisco, Horatio, Marcellus, Ghost)</SCENEPERSONAE>

<STAGEDIR>Enter Barnardo and Francisco, two sentinels, meeting.</STAGEDIR>

<SPEECH>
<SPEAKER>BAR.</SPEAKER>
<LINE>Who's there?</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>FRAN.</SPEAKER>
<LINE>Nay, answer me. Stand and unfold yourself.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>BAR.</SPEAKER>
<LINE>Long live the King!</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>FRAN.</SPEAKER>
<LINE>Barnardo.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>BAR.</SPEAKER>
<LINE>He.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>FRAN.</SPEAKER>
<LINE>You come most carefully upon your hour.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>BAR.</SPEAKER>
<LINE>'Tis now strook twelf. Get thee to bed, Francisco.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>FRAN.</SPEAKER>
<LINE>For this relief much thanks. 'Tis bitter cold,</LINE>
<LINE>And I am sick at heart.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>BAR.</SPEAKER>
<LINE>Have you had quiet guard?</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>FRAN.</SPEAKER>
<LINE6>Not a mouse stirring.</LINE6>
</SPEECH>

<SPEECH>
<SPEAKER>BAR.</SPEAKER>
<LINE>Well, good night.</LINE>
<LINE>If you do meet Horatio and Marcellus,</LINE>
<LINE>The rivals of my watch, bid them make haste.</LINE>
</SPEECH>

<STAGEDIR>Enter Horatio and Marcellus.</STAGEDIR>

<SPEECH>
<SPEAKER>FRAN.</SPEAKER>
<LINE>I think I hear them. Stand ho! Who is there?</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>HOR.</SPEAKER>
<LINE>Friends to this ground.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>MAR.</SPEAKER>
<LINE4>And liegemen to the Dane.</LINE4>
</SPEECH>

<SPEECH>
<SPEAKER>FRAN.</SPEAKER>
<LINE>Give you good night.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>MAR.</SPEAKER>
<LINE4>O, farewell, honest soldier.</LINE4>
<LINE>Who hath reliev'd you?</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>FRAN.</SPEAKER>
<LINE5>Barnardo hath my place.</LINE5>
<LINE>Give you good night.</LINE>
</SPEECH>
<STAGEDIR>Exit Francisco.</STAGEDIR>

<<<Snipped out portion>>>

</SCENE>
</ACT>

<ACT>
<ACTTITLE>ACT II</ACTTITLE>

<SCENE>
<SCENETITLE>SCENE 2</SCENETITLE>
<SCENELOCATION>Elsinore. A room of state in the Castle.</SCENELOCATION>
<SCENEPERSONAE>(Claudius, Gertrude, Polonius, Laertes, Hamlet, Voltemand, Cornelius, Horatio, Marcellus, Barnardo)</SCENEPERSONAE>

<STAGEDIR>Flourish. Enter Claudius, King of Denmark, Gertrude the Queen; Council: as Polonius; and his son Laertes, Hamlet, cum aliis including Voltemand and Cornelius.</STAGEDIR>

<<<Snipped out portion>>>

<SPEECH>
<SPEAKER>HAM.</SPEAKER>
<LINE>Let her not walk i' th' sun. Conception is a blessing, but as your daughter may conceive, friend, look to't.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>POL.</SPEAKER><STAGEDIRINLINE>&#91;Aside.&#93;</STAGEDIRINLINE>
<LINE>How say you by that? still harping on my daughter. Yet he knew me not at first, 'a said I was a fishmonger. 'A is far gone. And truly in my youth I suff'red much extremity for love—very near this. I'll speak to him again.—What do you read, my lord?</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>HAM.</SPEAKER>
<LINE>Words, words, words.</LINE>
</SPEECH>

<<<Snipped out portion>>>

</SCENE>
</ACT>
</PLAY>

And now an explanation of the tags:

<PLAY> and </PLAY> The entire play has these tags around it. As will all the tags here, the slash (/) symbol shows the difference between an opening tag and a closing tag.
<TITLE> Encloses the play title.
<PERSONAE> Encloses the list of play characters.
<PERSTITLE>Dramatis Personae</PERSTITLE> This line will stay the same for every play.
<PERSONA> Encloses an individual character.

<ACT> Encloses each act.
<ACTTITLE> Encloses each act title.

<SCENE> Encloses each scene.
<SCENETITLE> Encloses each scene number.
<SCENELOCATION> Encloses each scene location.
<SCENEPERSONAE> Encloses list of characters in this scene. This is already done for each scene in the entire canon and is listed at the top of each scene on the site.
<STAGEDIR> Encloses the stage directions in a scene.

<SPEECH> Encloses the speaker and line for each exchange.
<SPEAKER> Encloses the name of the character speaking.
<LINE> Encloses the line spoken.

<LINE6> This indents the line 6 syllables. Look at the shared lines and count how many to add to the line. Get as close as possible, but don't worry about it if it's not exact.

<STAGEDIRINLINE> This encloses stage directions that aren't on their own line. An example is Polonius' aside in the above example.

I imagine that a programmer might be able to write a script to convert a play quite quickly, but there's still some manual checking to make sure it's accurate. Post if you have any questions and if you'd like to take on a play.

Thanks!
The administrator has disabled public write access.

Converting PlayShakespeare.com Editions to XML format 7 years 9 months ago #2339

  • William Shakespeare
  • William Shakespeare's Avatar
  • Offline
  • Administrator
  • Posts: 732
  • Thank you received: 18
Here's the list of plays to convert and the status of each:

All's Well That Ends Well- Complete
Antony & Cleopatra- Complete
As You Like It- Complete
Comedy of Errors- Complete
Coriolanus- Complete
Cymbeline- Complete
Edward III- Complete
Hamlet- Complete
Henry IV, Pt. 1- Complete
Henry IV, Pt. 2- Complete
Henry V- Complete
Henry VI, Pt. 1- Complete
Henry VI, Pt. 2- Complete
Henry VI, Pt. 3-Complete
Henry VIII-Complete
Julius Caesar- Complete
King John- Complete
King Lear- Tom Manning Complete
King Richard II- Complete
Love's Labour's Lost- Complete
Macbeth- Denise Battista
Measure for Measure- Complete
Merchant of Venice- Complete
Merry Wives of Windsor- Compelte
Midsummer Night's Dream- Complete
Much Ado About Nothing- Complete
Othello- Complete
Pericles- Complete
Richard III- Complete
Romeo & Juliet- Completed
Sir Thomas More- Complete
Taming of the Shrew- Complete
The Tempest- Completed
Timon of Athens- Completed
Titus Andronicus- Completed
Troilus & Cressida- Complete
Twelfth Night- Complete
Two Gentlemen of Verona- Complete
Two Noble Kinsmen- Complete
The Winter's Tale- Complete
Sonnets & Poems- Complete

Feel free to post here if you'd like to take on a play. If you'd like to convert a shorter play, take a look at our play list here:

http://www.playshakespeare.com/facts/57-play-lengths

...which shows the play lengths.
The administrator has disabled public write access.

Converting PlayShakespeare.com Editions to XML format 7 years 6 months ago #2457

  • William Shakespeare
  • William Shakespeare's Avatar
  • Offline
  • Administrator
  • Posts: 732
  • Thank you received: 18
The conversion of plays to XML is now complete! Thank you for your assistance!

See this post for more information and how you can help with the First Folio XML project:

http://www.playshakespeare.com/news/375 ... o-editions
The administrator has disabled public write access.
Moderators: William Shakespeare
 

Log in or Register

Register
Forgot username  Forgot password
Get the Shakespeare Pro app