Lines Matching defs:attrib
137 *tag* is the element name. *attrib* is an optional dictionary containing
142 <tag attrib>text<child/>...</tag>tail
149 attrib = None
169 def __init__(self, tag, attrib={}, **extra):
170 if not isinstance(attrib, dict):
171 raise TypeError("attrib must be dict, not %s" % (
172 attrib.__class__.__name__,))
174 self.attrib = {**attrib, **extra}
180 def makeelement(self, tag, attrib):
184 *attrib* is a dictionary containing the element attributes.
189 return self.__class__(tag, attrib)
205 elem = self.makeelement(self.tag, self.attrib)
337 self.attrib.clear()
344 Equivalent to attrib.get, but some implementations may handle this a
352 return self.attrib.get(key, default)
357 Equivalent to attrib[key] = value, but some implementations may handle
362 self.attrib[key] = value
368 Python dict. Equivalent to attrib.keys()
371 return self.attrib.keys()
377 attrib.items().
382 return self.attrib.items()
426 def SubElement(parent, tag, attrib={}, **extra):
433 *parent* is the parent element, *tag* is the subelements name, *attrib* is
438 attrib = {**attrib, **extra}
439 element = parent.makeelement(tag, attrib)
1643 attrib = {}
1646 attrib[fixname(attr_list[i])] = attr_list[i+1]
1647 return self.target.start(tag, attrib)