Hi everybody
I am writing some kind of simple CMS. Therefore, I have to parse HTML-files containing special CMS-tags (<!t>,<!/t>,<!content/>,...). The parsing should generate some sort of object-tree. It is very similar to XML-DOM-parsing.
I have already done the base of my CMS. Textparsing works fine but it is SLOW as hell ...
My question is: What is the best way to parse tags into a tree-like object-structure?
The problem is I have to read each character on its own.
Now I am using function substr($str,$offset,1) and $str{$i}
to step through the text. But they are awfully slow if you have to parse huge amount of data.
Please help me! I am looking for this everywhere and cannot find a decent solution. I am sure there must be effective ways to parse a file like this.
greetings bronko