Update xml2json.py

This patch adds support for Python version >= 2.6 and for Python version >= 3.0
and code is pep8 clean now