You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+45Lines changed: 45 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,51 @@ in ambiguous cases, so you can easily handle it afterwards, e.g. in [validatacla
5
5
6
6
## Usage
7
7
8
+
### Summary
9
+
10
+
`xml_string_to_dict()` takes a string with xml content and converts it to a python dictionary.
11
+
12
+
Optional arguments can be provided to control specific behaviour:
13
+
-`ensure_array_keys` to make sure specific tags are always parsed as a list, even if it has only one element.
14
+
-`remote_type_tags` and `conditional_remote_type_tags` to make sure specific tags will (always or in specific conditions) be interpreted as type names and therefore omitted in the output.
15
+
-`ignore_attributes` to specify which attributes should be ignored for a cleaner output.
16
+
17
+
If you prefer to do the conversion from `str` to `etree.Element` yourself,
18
+
you can use `xml_to_dict()` instead, which takes an `etree.Element` as input,
19
+
and otherwise works the same as `xml_string_to_dict()`
20
+
(which is a wrapper around `string_to_xml_etree()` and `xml_to_dict()`).
0 commit comments