Refactored a lot.
* Added type hierarchy to output results.
* Used XmlEntity namedtuple in place of builtin tuples.
* Added support for diving into attribute groups.