Skip to content

Commit 5dd203b

Browse files
committed
Fixed typos and formatting in readme
1 parent d9a1de1 commit 5dd203b

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# xml2pyton
1+
# xml2python
22

33
Takes XML input and converts it to a dict. The output can be optimized by removing unnecessary nesting or ensuring lists
4-
in ambiguous cases, so you can easily handle it afterwards, eg in [validataclass](https://pypi.org/project/validataclass/).
4+
in ambiguous cases, so you can easily handle it afterwards, e.g. in [validataclass](https://pypi.org/project/validataclass/).
55

66
## Usage
77

@@ -52,7 +52,7 @@ Without the optional arguments, this:
5252
```
5353

5454

55-
### Parameter `ensure_array_keys`
55+
### Parameter: `ensure_array_keys`
5656

5757
The `ensure_array_keys` list can be provided to specify for which keys in which tags, the values
5858
should always be interpreted as items of a list. In case there is only one child item, they would otherwise
@@ -86,7 +86,7 @@ the example above would be converted to this, interpreting the values of the giv
8686
```
8787

8888

89-
### Parameter `remote_type_tags`
89+
### Parameter: `remote_type_tags`
9090

9191
The `remote_type_tags` list can be provided to specify which tags should be interpreted as names of types,
9292
e.g. enums, which don't need to be preserved as keys in the output dict.
@@ -155,7 +155,10 @@ but only one of them should be skipped, for example:
155155
can be parsed into a non-nested field named 'resultCode' with the content 'ok'
156156
by giving `conditional_remote_type_tags=[('resultCode', 'resultCode')]`.
157157

158-
The 'ignore_attributes' list can be given to avoid parsing attributes with a certain name.
158+
159+
### Parameter: `ignore_attributes`
160+
161+
The `ignore_attributes` list can be given to avoid parsing attributes with a certain name.
159162
This is useful if a tag could either have a simple string value as a child, or be self-closing -
160163
and the self-closing version should be interpreted as if the tag's value is null
161164
(because there might be attributes that say this, but in a weirdly complicated way).
@@ -180,7 +183,7 @@ And if we were to just skip the attribute by adding it to `remote_type_tags`, we
180183

181184
Which would be very misleading. So to parse this tag into a useful value for an 'Optional[str]' type field,
182185
the ignore_attributes list can be used.
183-
With ignore_attributes=['{http://www.w3.org/2001/XMLSchema-instance}nil'], we get a result that fits the type:
186+
With `ignore_attributes=['{http://www.w3.org/2001/XMLSchema-instance}nil']`, we get a result that fits the type:
184187

185188
```
186189
'resultDescription': None

0 commit comments

Comments
 (0)