Click here to Skip to main content
15,870,130 members
Articles / Programming Languages / XML

XMLLib for PUGXML with XPath

Rate me:
Please Sign up or sign in to vote.
4.33/5 (11 votes)
29 Oct 2009CPOL5 min read 125.6K   1.2K   38  
A library for PugXML which implements XPath
<?xml version="1.0"?>

<PLAY>
<TITLE>The Tragedy of Hamlet, Prince of Denmark</TITLE>

<fm>
<p>Text placed in the public domain by Moby Lexical Tools, 1992.</p>
<p>SGML markup by Jon Bosak, 1992-1994.</p>
<p>XML version by Jon Bosak, 1996-1997.</p>
<p>This work may be freely copied and distributed worldwide.</p>
</fm>


<PERSONAE>
<TITLE>Dramatis Personae</TITLE>

<PERSONA>CLAUDIUS, king of Denmark. </PERSONA>
<PERSONA>HAMLET, son to the late, and nephew to the present king.</PERSONA>
<PERSONA>POLONIUS, lord chamberlain. </PERSONA>
<PERSONA>HORATIO, friend to Hamlet.</PERSONA>
<PERSONA>LAERTES, son to Polonius.</PERSONA>
<PERSONA>LUCIANUS, nephew to the king.</PERSONA>

<PGROUP>
<PERSONA> SOMEBODY. </PERSONA>
<PERSONA>CORNELIUS</PERSONA>
<PERSONA>ROSENCRANTZ</PERSONA>
<PERSONA>GUILDENSTERN</PERSONA>
<PERSONA>OSRIC</PERSONA>
<GRPDESCR>courtiers.</GRPDESCR>
</PGROUP>

</PERSONAE>

<SCNDESCR>SCENE  Denmark.</SCNDESCR>

<PLAYSUBT>HAMLET</PLAYSUBT>

<ACT><TITLE>ACT I</TITLE>

<SCENE><TITLE>SCENE I.  Elsinore. A platform before the castle.</TITLE>
<STAGEDIR>FRANCISCO at his post. Enter to him BERNARDO</STAGEDIR>

<SPEECH>
<SPEAKER>BERNARDO</SPEAKER>
<LINE>Who's there?</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>FRANCISCO</SPEAKER>
<LINE>Nay, answer me: stand, and unfold yourself.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>BERNARDO</SPEAKER>
<LINE>Long live the king!</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>FRANCISCO</SPEAKER>
<LINE>Bernardo?</LINE>
</SPEECH>

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

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

<SPEECH>
<SPEAKER>BERNARDO</SPEAKER>
<LINE>'Tis now struck twelve; get thee to bed, Francisco.</LINE>
</SPEECH>

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

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

<SPEECH>
<SPEAKER>FRANCISCO</SPEAKER>
<LINE>Not a mouse stirring.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>BERNARDO</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>

<SPEECH>
<SPEAKER>FRANCISCO</SPEAKER>
<LINE>I think I hear them. Stand, ho! Who's there?</LINE>
</SPEECH>


<STAGEDIR>Enter HORATIO and MARCELLUS</STAGEDIR>

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

<SPEECH>
<SPEAKER>MARCELLUS</SPEAKER>
<LINE>And liegemen to the Dane.</LINE>
</SPEECH>



<STAGEDIR>Exit</STAGEDIR>

<SPEECH>
<SPEAKER>MARCELLUS</SPEAKER>
<LINE>Holla! Bernardo!</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>BERNARDO</SPEAKER>
<LINE>Say,</LINE>
<LINE>What, is Horatio there?</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>HORATIO</SPEAKER>
<LINE>What art thou that usurp'st this time of night,</LINE>
<LINE>Together with that fair and warlike form</LINE>
<LINE>In which the majesty of buried Denmark</LINE>
<LINE>Did sometimes march? by heaven I charge thee, speak!</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>MARCELLUS</SPEAKER>
<LINE>It is offended.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>BERNARDO</SPEAKER>
<LINE>See, it stalks away!</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>HORATIO</SPEAKER>
<LINE>Stay! speak, speak! I charge thee, speak!</LINE>
</SPEECH>


<STAGEDIR>Exit Ghost</STAGEDIR>

<SPEECH>
<SPEAKER>MARCELLUS</SPEAKER>
<LINE>'Tis gone, and will not answer.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>BERNARDO</SPEAKER>
<LINE>How now, Horatio! you tremble and look pale:</LINE>
<LINE>Is not this something more than fantasy?</LINE>
<LINE>What think you on't?</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>HORATIO</SPEAKER>
<LINE>Before my God, I might not this believe</LINE>
<LINE>Without the sensible and true avouch</LINE>
<LINE>Of mine own eyes.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>MARCELLUS</SPEAKER>
<LINE>Is it not like the king?</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>HORATIO</SPEAKER>
<LINE>As thou art to thyself:</LINE>
<LINE>Such was the very armour he had on</LINE>
<LINE>When he the ambitious Norway combated;</LINE>
<LINE>So frown'd he once, when, in an angry parle,</LINE>
<LINE>He smote the sledded Polacks on the ice.</LINE>
<LINE>'Tis strange.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>MARCELLUS</SPEAKER>
<LINE>Thus twice before, and jump at this dead hour,</LINE>
<LINE>With martial stalk hath he gone by our watch.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>HORATIO</SPEAKER>
<LINE>In what particular thought to work I know not;</LINE>
<LINE>But in the gross and scope of my opinion,</LINE>
<LINE>This bodes some strange eruption to our state.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>MARCELLUS</SPEAKER>
<LINE>Shall I strike at it with my partisan?</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>HORATIO</SPEAKER>
<LINE>Do, if it will not stand.</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>HORATIO</SPEAKER>
<LINE>So have I heard and do in part believe it.</LINE>
<LINE>But, look, the morn, in russet mantle clad,</LINE>
<LINE>Walks o'er the dew of yon high eastward hill:</LINE>
<LINE>Break we our watch up; and by my advice,</LINE>
<LINE>Let us impart what we have seen to-night</LINE>
<LINE>Unto young Hamlet; for, upon my life,</LINE>
<LINE>This spirit, dumb to us, will speak to him.</LINE>
<LINE>Do you consent we shall acquaint him with it,</LINE>
<LINE>As needful in our loves, fitting our duty?</LINE>
</SPEECH>

<SPEECH>
<SPEAKER>MARCELLUS</SPEAKER>
<LINE>Let's do't, I pray; and I this morning know</LINE>
<LINE>Where we shall find him most conveniently.</LINE>
</SPEECH>


<STAGEDIR>Exeunt</STAGEDIR>
</SCENE>


</ACT>
</PLAY>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions