Example #1
0
 def parse(Self, file):
     xml = Tag.parse(file)
     return Self(
         width = xml['width'],
         height = xml['height'],
         groups = list(
             element
             for element in xml.tags
             if element.name == 'g'
         ),
         defs = dict(
             (element['id'], element)
             for element in xml[Name('defs')].tags
         ),
     )
Example #2
0
def parse(file):
    return Tag.parse(file)