This commit is contained in:
@@ -18,6 +18,7 @@ SOAP_NS = "http://www.w3.org/2003/05/soap-envelope"
|
||||
# Child tags of an Element that hold nested Element lists.
|
||||
_LIST_TAGS = ("Fields", "List", "Tables", "Properties")
|
||||
_SCALAR_TAGS = ("Key", "Value", "ValueType")
|
||||
_BINARY_TAG = "BData"
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -27,6 +28,7 @@ class Element:
|
||||
key: str | None = None
|
||||
value: str | None = None
|
||||
value_type: str | None = None
|
||||
bdata: str | None = None
|
||||
fields: list["Element"] = field(default_factory=list)
|
||||
items: list["Element"] = field(default_factory=list) # <List>
|
||||
tables: list["Element"] = field(default_factory=list)
|
||||
@@ -159,6 +161,8 @@ def _parse_element(node: ET.Element) -> Element:
|
||||
element.tables.append(_parse_element(child))
|
||||
elif local == "Properties":
|
||||
element.properties.append(_parse_element(child))
|
||||
elif local == _BINARY_TAG:
|
||||
element.bdata = (child.text or "").strip()
|
||||
return element
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user