Skip to content
Back to top
View this page
Edit this page

# xonsh.webconfig.tags

class xonsh.webconfig.tags.Elem(tag: str, *cls: str, **kwargs: str)
  append(subelement, /)
  clear(/)
  extend(elements, /)
  find(/, path, namespaces=None)
  findall(/, path, namespaces=None)
  findtext(/, path, default=None, namespaces=None)
  get(/, key, default=None)
  insert(index, subelement, /)
  items(/)
  iter(/, tag=None)
  iterfind(/, path, namespaces=None)
  itertext(/)
  keys(/)
  makeelement(tag, attrib, /)
  remove(subelement, /)
  set(key, value, /)
  set_attrib(*cls: str, **kwargs: str)
  to_str() → bytes
  attrib

    Dictionary of the element’s attributes.

  tag

    The element’s name.

  tail

    Text after this element’s end tag, but before the next sibling element’s start tag. This is either a string or the value None. Note that if there was no text, this attribute may be either None or an empty string, depending on the parser.

  text

    Text before first subelement. This is either a string or the value None. Note that if there is no text, this attribute may be either None or the empty string, depending on the parser.

xonsh.webconfig.tags.to_pretty(txt: str)

xonsh.webconfig.tags.to_str(elems: Iterable[Elem] | Elem, debug=False) → str