This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 = [] |