It's too late for me to look into code right now, but i might have a look in the morning if you still need it. But my suggestion to you is that you look for < and then a > thus marking the opening or...