Beautiful parse joy - Oh what fun

KvS keesvanschaik at gmail.com
Wed May 17 13:06:58 EDT 2006


Maybe a more robust approach is just to walk through the string
counting the (increments) of the number of brackets "<" and ">" as you
know that all the relevant text occurs right after a ">" has occured
that sets your counter to 0 (meaning you're at the "highest level").
There's no relevant text if the next character is again a "<".




More information about the Python-list mailing list