On 9 Aug 2009, at 23:01, Iván -DrSlump- Montes wrote:

Have a look at PHP's tokenizer function token_get_all. It will give you a rock solid base for your filter since it uses the same parser used in the PHP engine.

Actually it might not be that simple, because XML is parsed by PHPTAL and it's not exactly the same syntax as PHP (tokens may be useful for filtering PHP blocks themselves, but not to find them).

I'd like to expose PHPTAL's parsed DOM to make such prefilters easier and more accurate. I'm still waiting for suggestions how to do that:

http://lists.motion-twin.com/pipermail/phptal/2009-June/001691.html

--
regards, Kornel


_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to