Hey all. I'm going to setup a site with HTML tutorials, I write my turoails in Word, and mark them up in an XMLish manner. Being that they are HTML tutorials i want to be able to give examples of HTML code, then show the results of that code. What I've done is setup two types of "boxes" (they'll be grey "boxes" that example code, and results will be displayed in). One, denoted by a tag <codebox> and </codebox> will be where example code is placed. Anything in a codebox i want the browser not to parse (presumably the program would loop through all the tags in a codebox and replace the greater/less than symbols). Anything in a resultbox (<resultbox> and </resultbox>) i want the browser to parse literally.
Here's an example out of one of my tutorials.
"Below is an example of the font tag being used to manipulate text size.
<codebox>
<font size = "7">Large Text</font>
<br/>
<font size = "1">Small Text</font>
</codebox>
The result:
<resultbox>
<font size = "7">Large Text</font>
<br/>
<font size = "1">Small Text</font>
</resultbox>
"
Get the idea?
Now, it's easy enough to write a function to deal with particular start elements and end elements, but what i need to be able to do is treat the stuff between those particular elements differently.
Any ideas?
Many thanks!