MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / get

Method get

tools/python-3.11.9-amd64/Lib/xml/etree/ElementTree.py:342–353  ·  view source on GitHub ↗

Get element attribute. Equivalent to attrib.get, but some implementations may handle this a bit more efficiently. *key* is what attribute to look for, and *default* is what to return if the attribute was not found. Returns a string containing the attribute va

(self, key, default=None)

Source from the content-addressed store, hash-verified

340 self.text = self.tail = None
341
342 def get(self, key, default=None):
343 """Get element attribute.
344
345 Equivalent to attrib.get, but some implementations may handle this a
346 bit more efficiently. *key* is what attribute to look for, and
347 *default* is what to return if the attribute was not found.
348
349 Returns a string containing the attribute value, or the default if
350 attribute was not found.
351
352 """
353 return self.attrib.get(key, default)
354
355 def set(self, key, value):
356 """Set element attribute.

Callers 7

xpath_tokenizerFunction · 0.45
selectFunction · 0.45
select_negatedFunction · 0.45
_includeFunction · 0.45
add_qnameFunction · 0.45
XMLIDFunction · 0.45
_startMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected