I'd like to take scripts (ie, plays, movies, etc...) and make them into HTML via PHP.
Let's say I have the following XML script:
<script>
<dialog character=â€bobâ€>Hello</dialog>
<direction to=â€bobâ€>Move Stage Right</direction>
<tech area=â€lighting†subject=â€Spot 1†verb=â€on†object=â€bob†/>
<dialog character=â€bobâ€>My name is Bob, and I have a story to tell you...</dialog>
<note to=â€bobâ€>Say this with great emphasis</note>
</script>
And I'd like to turn it into HTML that looks like:
<table width=â€100%†border=â€0â€>
<tr><td><b>Bob:</b></td><td>Hello</td></tr>
<tr><td colspan=2><i>[Bob Move Stage Right]</i></td></tr>
<tr><td colspan=2><i><b>Lighting</b>: Spot 1 ON Bob</i></td></tr>
<tr><td><b>Bob:</b></td><td>My name is Bob, and I have a story to tell you...</td></tr>
<tr><td colspan=2><i>Bob, Say this with great emphasis</i></td></tr>
</table>
How would I do this? I'd prefer not to use the DOM API because I really don't understand it at all. This seems like it'd be so simple, but I have no idea how.
Also, maybe a good XML and PHP tutorial would be nice, but I can't find one.
Thanks