Home | History | Annotate | Download | only in etree

Lines Matching refs:elem

199         elem = self.makeelement(self.tag, self.attrib)
200 elem.text = self.text
201 elem.tail = self.tail
202 elem[:] = self
203 return elem
211 "Use specific 'len(elem)' or 'elem is not None' test instead.",
285 "Use 'list(elem)' or iteration over elem instead.",
418 "Use 'elem.iter()' or 'list(elem.iter())' instead.",
838 def _namespaces(elem, default_namespace=None):
877 for elem in elem.iter():
878 tag = elem.tag
887 for key, value in elem.items():
894 text = elem.text
899 def _serialize_xml(write, elem, qnames, namespaces,
901 tag = elem.tag
902 text = elem.text
912 for e in elem:
917 items = list(elem.items())
936 if text or len(elem) or not short_empty_elements:
940 elem:
946 if elem.tail:
947 write(_escape_cdata(elem.tail))
957 def _serialize_html(write, elem, qnames, namespaces, **kwargs):
958 tag = elem.tag
959 text = elem.text
969 for e in elem:
973 items = list(elem.items())
1000 for e in elem:
1004 if elem.tail:
1005 write(_escape_cdata(elem.tail))
1007 def _serialize_text(write, elem):
1008 for part in elem.itertext():
1010 if elem.tail:
1011 write(elem.tail)
1165 def dump(elem):
1170 *elem* is either an ElementTree, or a single Element. The exact output
1176 if not isinstance(elem, ElementTree):
1177 elem = ElementTree(elem)
1178 elem.write(sys.stdout, encoding="unicode")
1179 tail = elem.getroot().tail
1213 Returns an iterator providing (event, elem) pairs.
1288 """Return an iterator over currently available (event, elem) pairs.
1334 for elem in tree.iter():
1335 id = elem.get("id")
1337 ids[id] = elem
1413 self._last = elem = self._factory(tag, attrs)
1415 self._elem[-1].append(elem)
1416 self._elem.append(elem)
1418 return elem