Skip to content

Instantly share code, notes, and snippets.

@baverman
baverman / xml2dict.py
Last active January 4, 2016 09:09 — forked from anonymous/xml2dict.py
# Simple xml to dict parser
#
# It's usable only for small documents due low performance
# comparing with lxml
from xml.etree import cElementTree as etree
from cStringIO import StringIO
def builder(ptag, attrib, pchild):
child = []