improved xml parsing.

using lxml and event iteration.
.