I was recently given permission to make a project I've been working on open source under the GPL license.
The goal of this project was to convert EmeraldCoast.com from PHP into an XML based language specific to the site to make it easier for
non-developers to make changes, so that a common object on the site could easily be reused.
For example, rather than needing all of the code typically required for a tabbed box, javascript, html etc. Someone could put in this
and have a tab box with two tabs, plus the content, including all of the Javascript needed to generate the box.
To do this, output buffering was turned on in a file prepended using an .htaccess. Another file was appended that would capture the output.
The file that captured the output would send the entirety of the HTML/XML to a class that would go through and find each occurence of a module. It worked as a communicator class, sending the proper nodes to handlers of each module, which would themselves spit out what should replace the XML, repeating as necessary until all modules had been taken care of.
To find the modules, I created 2 other classes to parse the XML, one encompassed the whole document, and another was used for singular nodes. The functionality of them was based off of Javascript, so that someone creating new modules would be hopefully familiar with the syntax.
Sample Syntax: