complete xml newbie here...
I am attempting to create a screenwriting program. I envision it as a richtextbox where depending on the start position of the first character and/or formating of the line it is determined what kind of tag it should get in xml.
the user does not enter any tags - the user just types the words. I have included an example of what the text would look like.
there are :
- TRANSITIONS :"Fade In:"
- SLUGLINES :"EXT. ..." and "INT. ..."
- CUEs :"DANI" and "FLORENCE"
- PARENTHESIS: () for Dani in this example
- ACTION: "two figures ..." and "Florence has ..." and "a loud crack" etc etc
so the question is : how do I translate this into xml? the tags/nodes in the xml would be named "transition", "slugline", "cue","parenthesis", "action"
there can be any number of tags of all kinds, in any kind of order.
I'm assuming the xml would look something like this :
<?xml version="1.0" encoding="utf-8" ?>
<Transition>FADE IN:</Transition>
<Act>
<ActName>ACT I</ActName>
<SlugLine>
<SluglineText>EXT. FOREST - NIGHT</SluglineText>
<Action>Two figures - teenagers- walk side by side, their flashlight piercing the darkness.
DANI (16) and FLORENCE (16) look scared. The noises from the nightly forest are disconcerting.</Action>
<Cue>DANI</Cue>
<parenthesis>(exasperated)</parenthesis>
<dialogue>Why did you not pack the map? We've been walking for hours! I'm tired and I've got blisters on my feet.</dialogue>
<Action>Florence has obviously been crying, her eyes are red. Inflamed looking even.</Action>
<Cue>FLORENCE</Cue>
<dialogue>I'm sorry, okay - how often do I have to apologise? I just forgot!</dialogue>
<Action>A loud CRACK behind them - they shriek!</Action>
<Action>The previous conversation all but forgotten, they hide behind a bush, huddled together.</Action>
</SlugLine>
</Act>
I haven't got a clue - like I said, complete xml newbie. xml might not even be the best way to go about it! any help would be greatly appreciated!