R
Rob Hunter
Hi all,
I'm looking to implement a "plug-in" language which is essentially just
HTML plus a few custom tags that I want to support. For example, some
source code in this language might look like
<ul>
<li><FOO>something</FOO></li>
<li><BAR>something else</BAR></li>
</ul>
where FOO and BAR are special tags that have some meaning that I define.
Say, for this example, that FOO strongs text inside a <p> tag, and BAR
emphasizes text inside a blink tag. So the "compiled down" source would
look like
<ul>
<li><p><strong>something</strong></p></li>
<li><blink><em>something else</em></blink></li>
</ul>
Is there some open-source software that already does something like
this? Absent that, it seems like the best way is to just read in the
HTML with something like XmlSimple, write a simple interpreter to grovel
over the expression, evaluating the custom tags as they come up, and the
spitting out the resulting HTML.
Thanks in advance for any advice!
--rob
I'm looking to implement a "plug-in" language which is essentially just
HTML plus a few custom tags that I want to support. For example, some
source code in this language might look like
<ul>
<li><FOO>something</FOO></li>
<li><BAR>something else</BAR></li>
</ul>
where FOO and BAR are special tags that have some meaning that I define.
Say, for this example, that FOO strongs text inside a <p> tag, and BAR
emphasizes text inside a blink tag. So the "compiled down" source would
look like
<ul>
<li><p><strong>something</strong></p></li>
<li><blink><em>something else</em></blink></li>
</ul>
Is there some open-source software that already does something like
this? Absent that, it seems like the best way is to just read in the
HTML with something like XmlSimple, write a simple interpreter to grovel
over the expression, evaluating the custom tags as they come up, and the
spitting out the resulting HTML.
Thanks in advance for any advice!
--rob