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