htmy.etree
ETreeConverter
Utility for converting XML strings to custom components.
Source code in htmy/etree.py
__init__(rules)
Initialization.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rules
|
Mapping[str, Callable[..., ComponentType]]
|
Tag-name to component conversion rules. |
required |
convert(element)
Converts the given (possibly multi-root) XML string to a component.
Source code in htmy/etree.py
convert_element(element)
Converts the given Element
to a component.