xcp.xmlunwrap

xmlunwrap - general methods to unwrap XML elements & attributes

exception xcp.xmlunwrap.XmlUnwrapError[source]

Bases: Exception

xcp.xmlunwrap.getBoolAttribute(el: Element, attrs: list[str], default: bool | None = None) bool | None[source]
xcp.xmlunwrap.getElementsByTagName(el, tags, mandatory=False)[source]
xcp.xmlunwrap.getIntAttribute(el: Element, attrs: list[str], default: int | None = None) int | None[source]
xcp.xmlunwrap.getMapAttribute(el: Element, attrs: list[str], mapping: list[tuple[str, int]], default: str | None = None) Any[source]
xcp.xmlunwrap.getStrAttribute(el: Element, attrs: list[str], default: str | None = '', mandatory: bool | None = False) str | None[source]
xcp.xmlunwrap.getText(nodelist: Element) str[source]

Return the text of the element as stripped string