itais SAX parser

A

Anonymous

Guest
Hey, everybody!
I'm pretty new to this forum, so let me introduce myself with a script that I completed just recently :D
It's a general-purpose and highly-extensible-and-flexible event-based markup parser. I've been working on this since about 4 days, and it was very difficult to make, but is finally done! I made this because I needed it in a CMSF project that I'm working on.

Here's the link: https://www.solidfiles.com/v/k3RKypwDmrqMB (a copy of the license, CLNS, can be found in License.txt)

Here's a simple example:
Code:
$parser = new iSAXParser("[@[command]]", "[/]");
$parser->Load("[color]This is red text[/] And this is plain text");
echo($parser->Parse(function ($command, $body)
{
    if ($command == "color") return "<span style=\"color:red\">$body</span>";
    else return $body;
}));
Unfortunately, I haven't quite completed it, so the validator isn't done, and inline tags aren't done either. If you feel like helping, you can edit it and post it here.
You can see all of the available functions in the parser.php file.
 
That looks more complicated than trying to read through a mirror with lipstick all over it :?
 
hyper said:
That looks more complicated than trying to read through a mirror with lipstick all over it :?
That's bad luck for you, since my new code (which I haven't posted here yet) is even more complicated and about 50 more lines :D
 
Back
Top