added a decent XML DOM interface based on Python's lxml.etree