weaver.xml_util

Package lxml is employed directly even though some linters (e.g.: bandit) report to employ defusedxml instead, because that package’s extension with lxml is marked as deprecated.

To use the module, import is as if importing lxml.etree:

from weaver.xml_util import XML  # ElementTree
from weaver import xml_util

data = xml_util.fromstring("<xml>content</xml>")

Module Contents

weaver.xml_util.XML_PARSER[source]
weaver.xml_util.tostring[source]
weaver.xml_util.Element[source]
weaver.xml_util.ParseError[source]
weaver.xml_util.XML[source]
weaver.xml_util._lxml_fromstring[source]
weaver.xml_util.fromstring(text, parser=XML_PARSER)[source]
weaver.xml_util.parse(source, parser=XML_PARSER)[source]
weaver.xml_util.fromstring[source]