-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
questionFurther information is requestedFurther information is requested
Description
It would be nice in some situations to have the ability to get the text value of a child element in one model field and get a dictionary of the element's attributes in another model field such as below:
class Range(BaseXmlModel, ns="ipxact", tag="range", nsmap=NSMAP):
left: int = element("left")
right: int = element("right")
left_attribs: Dict[str, str] = element(tag="left", default_factory=dict)
right_attribs: Dict[str, str] = element(tag="right", default_factory=dict)
with an XML Example of:
<range>
<left minimum="0">0</left>
<right minimum="8">15</right>
</range>
Currently this results in left_attribs
and right_attribs
being empty dictionaries.
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested