Not sure if it's really that much faster, but looks neater.
Use dict of the character elements/subtrees instead of searching the whole xml every time.