Repository: tefra/xsdata
Pull request #500 (2021-05-25 20:29:44)

Performance tweaks
```
❯ python --version
Python 3.9.3+
```

Netex performance tests (150mb sample), with warmup xml context

**v20.5**
Parse[LxmlEventHandler]: 40.819679975509644
Parse[EventHandler]: 33.96246695518494

**Current:**
Parse[LxmlEventHandler]: 37.3736617565155
Parse[EventHandler]: 29.598474502563477

```
Context cache size: 1906
XmlContext warmup: 1.1685614585876465
```



sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list)


codecov[bot]: # [Codecov](https://codecov.io/gh/tefra/xsdata/pull/500?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chris+Tsou) Report
> Merging [#500](https://codecov.io/gh/tefra/xsdata/pull/500?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chris+Tsou) (2874c06) into [master](https://codecov.io/gh/tefra/xsdata/commit/c5c683458c8458e593c1b603d5b2eb015f8e638c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chris+Tsou) (c5c6834) will **decrease** coverage by `0.02%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/tefra/xsdata/pull/500/graphs/tree.svg?width=650&height=150&src=pr&token=YzDDLtywvl&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chris+Tsou)](https://codecov.io/gh/tefra/xsdata/pull/500?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chris+Tsou)

```diff
@@             Coverage Diff             @@
##            master     #500      +/-   ##
===========================================
- Coverage   100.00%   99.97%   -0.03%     
===========================================
  Files           84       84              
  Lines         7413     7412       -1     
  Branches      1325     1325              
===========================================
- Hits          7413     7410       -3     
- Misses           0        1       +1     
- Partials         0        1       +1     
```


| [Impacted Files](https://codecov.io/gh/tefra/xsdata/pull/500?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chris+Tsou) | Coverage Δ | |
|---|---|---|
| [xsdata/formats/dataclass/parsers/nodes.py](https://codecov.io/gh/tefra/xsdata/pull/500/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chris+Tsou#diff-eHNkYXRhL2Zvcm1hdHMvZGF0YWNsYXNzL3BhcnNlcnMvbm9kZXMucHk=) | `100.00% <100.00%> (ø)` | |
| [xsdata/formats/dataclass/parsers/utils.py](https://codecov.io/gh/tefra/xsdata/pull/500/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chris+Tsou#diff-eHNkYXRhL2Zvcm1hdHMvZGF0YWNsYXNzL3BhcnNlcnMvdXRpbHMucHk=) | `100.00% <100.00%> (ø)` | |
| [xsdata/models/enums.py](https://codecov.io/gh/tefra/xsdata/pull/500/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chris+Tsou#diff-eHNkYXRhL21vZGVscy9lbnVtcy5weQ==) | `100.00% <100.00%> (ø)` | |
| [xsdata/utils/hooks.py](https://codecov.io/gh/tefra/xsdata/pull/500/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chris+Tsou#diff-eHNkYXRhL3V0aWxzL2hvb2tzLnB5) | `81.81% <0.00%> (-18.19%)` | :arrow_down: |
| [xsdata/codegen/handlers/class\_name\_conflict.py](https://codecov.io/gh/tefra/xsdata/pull/500/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chris+Tsou#diff-eHNkYXRhL2NvZGVnZW4vaGFuZGxlcnMvY2xhc3NfbmFtZV9jb25mbGljdC5weQ==) | `100.00% <0.00%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/tefra/xsdata/pull/500?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chris+Tsou).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chris+Tsou)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/tefra/xsdata/pull/500?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chris+Tsou). Last update [c5c6834...2874c06](https://codecov.io/gh/tefra/xsdata/pull/500?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chris+Tsou). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chris+Tsou).

sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list)


sonarcloud[bot]: Kudos, SonarCloud Quality Gate passed!

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=BUG)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=VULNERABILITY)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=tefra_xsdata&pullRequest=500&resolved=false&types=SECURITY_HOTSPOT)  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=tefra_xsdata&pullRequest=500&resolved=false&types=CODE_SMELL)

[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500) No Coverage information  
[<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=tefra_xsdata&pullRequest=500&metric=new_duplicated_lines_density&view=list)



Patch:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index bf84beb7..bdb756bc 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -2,7 +2,7 @@ exclude: tests/fixtures
 
 repos:
   - repo: https://github.com/asottile/pyupgrade
-    rev: v2.18.3
+    rev: v2.19.0
     hooks:
       - id: pyupgrade
         args: [--py37-plus]
diff --git a/xsdata/codegen/mappers/definitions.py b/xsdata/codegen/mappers/definitions.py
index 6e2d7e05..29c7e383 100644
--- a/xsdata/codegen/mappers/definitions.py
+++ b/xsdata/codegen/mappers/definitions.py
@@ -1,3 +1,4 @@
+import itertools
 from typing import Dict
 from typing import Iterator
 from typing import List
@@ -56,7 +57,7 @@ class DefinitionsMapper:
         binding = definitions.find_binding(text.suffix(port.binding))
         port_type = definitions.find_port_type(text.suffix(binding.type))
 
-        elements = collections.concat(binding.extended_elements, port.extended_elements)
+        elements = itertools.chain(binding.extended_elements, port.extended_elements)
         config = cls.attributes(elements)
 
         yield from cls.map_binding(definitions, binding, port_type, config)
@@ -185,10 +186,10 @@ class DefinitionsMapper:
 
         collections.prepend(
             fault_class.attrs,
-            *[
+            *(
                 cls.build_attr(f, str(DataType.STRING), native=True, namespace="")
                 for f in default_fields
-            ],
+            ),
         )
 
     @classmethod
diff --git a/xsdata/formats/converter.py b/xsdata/formats/converter.py
index a8c130f4..70ecb642 100644
--- a/xsdata/formats/converter.py
+++ b/xsdata/formats/converter.py
@@ -224,7 +224,6 @@ class StringConverter(Converter):
 class BoolConverter(Converter):
     def deserialize(self, value: Any, **kwargs: Any) -> bool:
         if isinstance(value, str):
-
             val = value.strip()
 
             if val in ("true", "1"):
@@ -265,16 +264,14 @@ class FloatConverter(Converter):
             raise ConverterError(e)
 
     def serialize(self, value: float, **kwargs: Any) -> str:
-        mode = kwargs.get("output", "xml")
-
         if math.isnan(value):
             return "NaN"
 
         if value == self.INF:
-            return "Infinity" if mode == "json" else "INF"
+            return "INF"
 
         if value == -self.INF:
-            return "-Infinity" if mode == "json" else "-INF"
+            return "-INF"
 
         return repr(value).upper().replace("E+", "E")
 
diff --git a/xsdata/formats/dataclass/context.py b/xsdata/formats/dataclass/context.py
index a1ce27d8..2027256b 100644
--- a/xsdata/formats/dataclass/context.py
+++ b/xsdata/formats/dataclass/context.py
@@ -157,6 +157,17 @@ class XmlContext:
             )
         return self.cache[clazz]
 
+    def build_recursive(self, clazz: Type, parent_ns: Optional[str] = None):
+        """Build the binding metadata for the given class and all of its
+        dependencies."""
+        if clazz not in self.cache:
+            meta = self.build(clazz, parent_ns)
+            for var in meta.get_all_vars():
+                types = var.element_types if var.elements else var.types
+                for tp in types:
+                    if is_dataclass(tp):
+                        self.build_recursive(tp, meta.namespace)
+
     def local_names_match(self, names: Set[str], clazz: Type) -> bool:
         try:
             meta = self.build(clazz)
diff --git a/xsdata/formats/dataclass/models/elements.py b/xsdata/formats/dataclass/models/elements.py
index 5afc0ade..5057f12e 100644
--- a/xsdata/formats/dataclass/models/elements.py
+++ b/xsdata/formats/dataclass/models/elements.py
@@ -1,3 +1,4 @@
+import itertools
 import operator
 import sys
 from dataclasses import is_dataclass
@@ -331,7 +332,7 @@ class XmlMeta(MetaMixin):
 
     def get_element_vars(self) -> List[XmlVar]:
         result = list(
-            collections.concat(self.wildcards, self.choices, *self.elements.values())
+            itertools.chain(self.wildcards, self.choices, *self.elements.values())
         )
         if self.text:
             result.append(self.text)
@@ -339,12 +340,12 @@ class XmlMeta(MetaMixin):
         return sorted(result, key=get_index)
 
     def get_attribute_vars(self) -> List[XmlVar]:
-        result = collections.concat(self.any_attributes, self.attributes.values())
+        result = itertools.chain(self.any_attributes, self.attributes.values())
         return sorted(result, key=get_index)
 
     def get_all_vars(self) -> List[XmlVar]:
         result = list(
-            collections.concat(
+            itertools.chain(
                 self.wildcards,
                 self.choices,
                 self.any_attributes,
diff --git a/xsdata/formats/dataclass/parsers/handlers/lxml.py b/xsdata/formats/dataclass/parsers/handlers/lxml.py
index 0c5bea44..0a340af8 100644
--- a/xsdata/formats/dataclass/parsers/handlers/lxml.py
+++ b/xsdata/formats/dataclass/parsers/handlers/lxml.py
@@ -1,4 +1,3 @@
-from dataclasses import dataclass
 from typing import Any
 from typing import Iterable
 
@@ -12,18 +11,10 @@ from xsdata.models.enums import EventType
 EVENTS = (EventType.START, EventType.END, EventType.START_NS)
 
 
-@dataclass
 class LxmlEventHandler(XmlHandler):
-    """
-    Event handler based on :class:`lxml.etree.iterparse` api.
+    """Event handler based on :class:`lxml.etree.iterparse` api."""
 
-    :param parser: The parser instance to feed with events
-    :param clazz: The target binding model. If None the parser will
-        auto locate it from the active xml context instance
-    :param queue: The XmlNode queue
-    :param objects: The list of intermediate parsed objects,
-        eg [(qname, object)]
-    """
+    __slots__ = ()
 
     def parse(self, source: Any) -> Any:
         """
@@ -66,25 +57,17 @@ class LxmlEventHandler(XmlHandler):
                 element.clear()
             elif event == EventType.START_NS:
                 prefix, uri = element
-                self.parser.start_prefix_mapping(prefix, uri)
+                self.parser.register_namespace(prefix or None, uri)
             else:
                 raise XmlHandlerError(f"Unhandled event: `{event}`.")
 
         return obj
 
 
-@dataclass
 class LxmlSaxHandler(SaxHandler):
-    """
-    Sax content handler based on :class:`lxml.etree.XMLParser` api.
-
-    :param parser: The parser instance to feed with events
-    :param clazz: The target binding model. If None the parser will
-        auto locate it from the active xml context instance
-    :param queue: The XmlNode queue
-    :param objects: The list of intermediate parsed objects,
-        eg [(qname, object)]
-    """
+    """Sax content handler based on :class:`lxml.etree.XMLParser` api."""
+
+    __slots__ = ()
 
     def parse(self, source: Any) -> Any:
         """
diff --git a/xsdata/formats/dataclass/parsers/handlers/native.py b/xsdata/formats/dataclass/parsers/handlers/native.py
index 04a23d63..7e6c6b5a 100644
--- a/xsdata/formats/dataclass/parsers/handlers/native.py
+++ b/xsdata/formats/dataclass/parsers/handlers/native.py
@@ -1,14 +1,14 @@
-from dataclasses import dataclass
-from dataclasses import field
 from typing import Any
 from typing import Dict
 from typing import Iterable
 from typing import Optional
 from typing import Tuple
+from typing import Type
 from xml import sax
 from xml.etree.ElementTree import iterparse
 
 from xsdata.exceptions import XmlHandlerError
+from xsdata.formats.dataclass.parsers.mixins import PushParser
 from xsdata.formats.dataclass.parsers.mixins import SaxHandler
 from xsdata.formats.dataclass.parsers.mixins import XmlHandler
 from xsdata.models.enums import EventType
@@ -17,21 +17,10 @@ from xsdata.utils.namespaces import build_qname
 EVENTS = (EventType.START, EventType.END, EventType.START_NS)
 
 
-@dataclass
 class XmlEventHandler(XmlHandler):
-    """
-    Event handler based on :func:`xml.etree.ElementTree.iterparse` api.
+    """Event handler based on :func:`xml.etree.ElementTree.iterparse` api."""
 
-    :param parser: The parser instance to feed with events
-    :param clazz: The target binding model. If None the parser will
-        auto locate it from the active xml context instance
-    :param queue: The XmlNode queue
-    :param objects: The list of intermediate parsed objects,
-        eg [(qname, object)]
-    """
-
-    # scope vars
-    ns_map: Dict = field(default_factory=dict, init=False)
+    __slots__ = ()
 
     def parse(self, source: Any) -> Any:
         """
@@ -49,7 +38,7 @@ class XmlEventHandler(XmlHandler):
     def process_context(self, context: Iterable) -> Any:
         """Iterate context and push the events to main parser."""
         obj = None
-        self.ns_map = {}
+        ns_map: Dict = {}
         for event, element in context:
             if event == EventType.START:
                 self.parser.start(
@@ -58,9 +47,9 @@ class XmlEventHandler(XmlHandler):
                     self.objects,
                     element.tag,
                     element.attrib,
-                    self.start_ns_bulk(self.ns_map),
+                    self.merge_parent_namespaces(ns_map),
                 )
-                self.ns_map = {}
+                ns_map = {}
             elif event == EventType.END:
                 obj = self.parser.end(
                     self.queue,
@@ -72,19 +61,21 @@ class XmlEventHandler(XmlHandler):
                 element.clear()
             elif event == EventType.START_NS:
                 prefix, uri = element
-                self.ns_map[prefix] = uri
+                ns_map[prefix or None] = uri
             else:
                 raise XmlHandlerError(f"Unhandled event: `{event}`.")
 
         return obj
 
 
-@dataclass
 class XmlSaxHandler(SaxHandler, sax.handler.ContentHandler):
     """Sax content handler based on native python."""
 
-    # Scope vars
-    ns_map: Dict = field(init=False, default_factory=dict)
+    __slots__ = ()
+
+    def __init__(self, parser: PushParser, clazz: Optional[Type]):
+        super().__init__(parser, clazz)
+        self.ns_map: Dict = {}
 
     def parse(self, source: Any) -> Any:
         """
@@ -117,6 +108,7 @@ class XmlSaxHandler(SaxHandler, sax.handler.ContentHandler):
 
         :param name: Namespace-name tuple
         :param qname: Not used
+        :param attrs: Attribute key-value map
         """
         attrs = {build_qname(key[0], key[1]): value for key, value in attrs.items()}
         self.start(build_qname(name[0], name[1]), attrs, self.ns_map)
@@ -145,11 +137,11 @@ class XmlSaxHandler(SaxHandler, sax.handler.ContentHandler):
         """
         self.data(content)
 
-    def startPrefixMapping(self, prefix: str, uri: str):
+    def startPrefixMapping(self, prefix: str, uri: Optional[str]):
         """
         Start element prefix-URI namespace mapping.
 
         :param prefix: Namespace prefix
         :param uri: Namespace uri
         """
-        self.ns_map[prefix] = uri
+        self.ns_map[prefix] = uri or ""
diff --git a/xsdata/formats/dataclass/parsers/mixins.py b/xsdata/formats/dataclass/parsers/mixins.py
index 80e1787a..52b18d1c 100644
--- a/xsdata/formats/dataclass/parsers/mixins.py
+++ b/xsdata/formats/dataclass/parsers/mixins.py
@@ -1,6 +1,4 @@
 import abc
-from dataclasses import dataclass
-from dataclasses import field
 from typing import Any
 from typing import Dict
 from typing import List
@@ -24,6 +22,7 @@ class PushParser(AbstractParser):
     """
 
     config: ParserConfig
+    ns_map: Dict
 
     @abc.abstractmethod
     def start(
@@ -52,9 +51,16 @@ class PushParser(AbstractParser):
         :return: The result of the binding process.
         """
 
-    @abc.abstractmethod
-    def start_prefix_mapping(self, prefix: NoneStr, uri: str):
-        """Add the given namespace in the registry."""
+    def register_namespace(self, prefix: NoneStr, uri: str):
+        """
+        Add the given prefix-URI namespaces mapping if the prefix is new.
+
+        :param prefix: Namespace prefix
+        :param uri: Namespace uri
+        """
+
+        if prefix not in self.ns_map:
+            self.ns_map[prefix] = uri
 
 
 class XmlNode(abc.ABC):
@@ -102,54 +108,60 @@ class XmlNode(abc.ABC):
         """
 
 
-@dataclass
 class XmlHandler:
-    """
-    Abstract content handler.
-
-    :param parser: The parser instance to feed with events
-    :param clazz: The target binding model. If None the parser will
-        auto locate it from the active xml context instance
-    :param queue: The XmlNode queue
-    :param objects: The list of intermediate parsed objects,
-        eg [(qname, object)]
-    """
+    """Abstract content handler."""
 
-    parser: PushParser
-    clazz: Optional[Type]
-    queue: List = field(default_factory=list)
-    objects: List = field(default_factory=list)
+    __slots__ = ("parser", "clazz", "queue", "objects")
+
+    def __init__(self, parser: PushParser, clazz: Optional[Type]):
+        """
+        :param parser: The parser instance to feed with events
+        :param clazz: The target binding model. If None the parser will
+            auto locate it from the active xml context instance
+        """
+        self.parser = parser
+        self.clazz = clazz
+        self.queue: List = []
+        self.objects: List = []
 
     def parse(self, source: Any) -> Any:
         """Parse an XML document from a system identifier or an InputSource."""
         raise NotImplementedError("This method must be implemented!")
 
-    def start_ns_bulk(self, ns_map: Dict) -> Dict:
+    def merge_parent_namespaces(self, ns_map: Dict) -> Dict:
         """
-        Bulk start-ns event handler that returns a normalized copy of the
-        prefix-URI map merged with the parent element map.
+        Merge and return the given prefix-URI map with the parent node.
+
+        Register new prefixes with the parser.
 
         :param ns_map: Namespace prefix-URI map
         """
-        try:
-            result = self.queue[-1].ns_map.copy()
-        except (IndexError, AttributeError):
+
+        if self.queue:
+            parent_ns_map = self.queue[-1].ns_map
+
+            if not ns_map:
+                return parent_ns_map
+
+            result = parent_ns_map.copy() if parent_ns_map else {}
+        else:
             result = {}
 
         for prefix, uri in ns_map.items():
-            prefix = prefix or None
-            self.parser.start_prefix_mapping(prefix, uri)
+            self.parser.register_namespace(prefix, uri)
             result[prefix] = uri
 
         return result
 
 
-@dataclass
-class SaxHandler(XmlHandler):
+class SaxHandler(XmlHandler, abc.ABC):
+
+    __slots__ = ("data_frames", "flush_next")
 
-    # Scope vars
-    data_frames: List = field(init=False, default_factory=list)
-    flush_next: Optional[str] = field(init=False, default=None)
+    def __init__(self, parser: PushParser, clazz: Optional[Type]):
+        super().__init__(parser, clazz)
+        self.data_frames: List = []
+        self.flush_next: Optional[str] = None
 
     def start(self, qname: str, attrs: Dict, ns_map: Dict):
         """
@@ -166,13 +178,17 @@ class SaxHandler(XmlHandler):
         """
         self.flush()
         self.data_frames.append(([], []))
+
+        if "" in ns_map:
+            ns_map[None] = ns_map.pop("")
+
         self.parser.start(
             self.clazz,
             self.queue,
             self.objects,
             qname,
             attrs,
-            self.start_ns_bulk(ns_map),
+            self.merge_parent_namespaces(ns_map),
         )
 
     def end(self, qname: str):
@@ -231,18 +247,15 @@ class SaxHandler(XmlHandler):
         self.data_frames[-1][index].append(data)
 
 
-@dataclass
 class EventsHandler(XmlHandler):
-    """
-    Sax content handler for pre-recorded events.
-
-    :param parser: The parser instance to feed with events
-    :param clazz: The target binding model. If None the parser will
-        auto locate it from the active xml context instance
-    :param queue: The XmlNode queue
-    :param objects: The list of intermediate parsed objects,
-        eg [(qname, object)]
-    """
+    """Sax content handler for pre-recorded events."""
+
+    __slots__ = ("data_frames", "flush_next")
+
+    def __init__(self, parser: PushParser, clazz: Optional[Type]):
+        super().__init__(parser, clazz)
+        self.data_frames: List = []
+        self.flush_next: Optional[str] = None
 
     def parse(self, source: List[Tuple]) -> Any:
         """Forward the pre-recorded events to the main parser."""
@@ -250,11 +263,21 @@ class EventsHandler(XmlHandler):
         obj = None
         for event, *args in source:
             if event == EventType.START:
-                self.parser.start(self.clazz, self.queue, self.objects, *args)
+                qname, attrs, ns_map = args
+                self.parser.start(
+                    self.clazz,
+                    self.queue,
+                    self.objects,
+                    qname,
+                    attrs,
+                    ns_map,
+                )
             elif event == EventType.END:
-                obj = self.parser.end(self.queue, self.objects, *args)
+                qname, text, tail = args
+                obj = self.parser.end(self.queue, self.objects, qname, text, tail)
             elif event == EventType.START_NS:
-                self.parser.start_prefix_mapping(*args)
+                prefix, uri = args
+                self.parser.register_namespace(prefix or None, uri)
             else:
                 raise XmlHandlerError(f"Unhandled event: `{event}`.")
 
diff --git a/xsdata/formats/dataclass/parsers/nodes.py b/xsdata/formats/dataclass/parsers/nodes.py
index d7ea7135..b0f3e3ca 100644
--- a/xsdata/formats/dataclass/parsers/nodes.py
+++ b/xsdata/formats/dataclass/parsers/nodes.py
@@ -87,17 +87,17 @@ class ElementNode(XmlNode):
 
     def bind(self, qname: str, text: NoneStr, tail: NoneStr, objects: List) -> bool:
         params: Dict = {}
-        text_node = False
         ParserUtils.bind_attrs(params, self.meta, self.attrs, self.ns_map)
 
         wild_var = self.meta.find_any_wildcard()
         if wild_var and wild_var.mixed:
             ParserUtils.bind_mixed_objects(params, wild_var, self.position, objects)
+            bind_text = False
         else:
             ParserUtils.bind_objects(params, self.meta, self.position, objects)
-            text_node = ParserUtils.bind_content(params, self.meta, text, self.ns_map)
+            bind_text = ParserUtils.bind_content(params, self.meta, text, self.ns_map)
 
-        if not text_node and wild_var:
+        if not bind_text and wild_var:
             ParserUtils.bind_wild_content(
                 params, wild_var, text, tail, self.attrs, self.ns_map
             )
@@ -108,7 +108,7 @@ class ElementNode(XmlNode):
 
         objects.append((qname, obj))
 
-        if not wild_var and self.mixed:
+        if self.mixed and not wild_var:
             tail = ParserUtils.normalize_content(tail)
             if tail:
                 objects.append((None, tail))
@@ -431,7 +431,10 @@ class StandardNode(XmlNode):
 class SkipNode(XmlNode):
     """Utility node to skip parsing unknown properties."""
 
-    __slots__ = ()
+    __slots__ = ("ns_map",)
+
+    def __init__(self):
+        self.ns_map = {}
 
     def child(self, qname: str, attrs: Dict, ns_map: Dict, position: int) -> XmlNode:
         """Skip nodes children are skipped as well."""
@@ -554,17 +557,6 @@ class NodeParser(PushParser):
 
         return obj
 
-    def start_prefix_mapping(self, prefix: NoneStr, uri: str):
-        """
-        Add the given prefix-URI namespaces mapping if the prefix is new.
-
-        :param prefix: Namespace prefix
-        :param uri: Namespace uri
-        """
-        prefix = prefix or None
-        if prefix not in self.ns_map:
-            self.ns_map[prefix] = uri
-
 
 @dataclass
 class RecordParser(NodeParser):
@@ -627,6 +619,6 @@ class RecordParser(NodeParser):
         self.events.append((EventType.END, qname, text, tail))
         return super().end(queue, objects, qname, text, tail)
 
-    def start_prefix_mapping(self, prefix: NoneStr, uri: str):
+    def register_namespace(self, prefix: NoneStr, uri: str):
         self.events.append((EventType.START_NS, prefix, uri))
-        super().start_prefix_mapping(prefix, uri)
+        super().register_namespace(prefix, uri)
diff --git a/xsdata/formats/dataclass/parsers/utils.py b/xsdata/formats/dataclass/parsers/utils.py
index 047c43b0..a8d56e11 100644
--- a/xsdata/formats/dataclass/parsers/utils.py
+++ b/xsdata/formats/dataclass/parsers/utils.py
@@ -15,6 +15,7 @@ from xsdata.formats.dataclass.models.generics import AnyElement
 from xsdata.formats.dataclass.models.generics import DerivedElement
 from xsdata.logger import logger
 from xsdata.models.enums import QNames
+from xsdata.utils import constants
 from xsdata.utils import text
 from xsdata.utils.namespaces import build_qname
 
@@ -33,7 +34,7 @@ class ParserUtils:
     @classmethod
     def is_nillable(cls, attrs: Dict) -> bool:
         """Return whether the element attrs has xsi:nil="false"."""
-        return attrs.get(QNames.XSI_NIL) != "false"
+        return attrs.get(QNames.XSI_NIL) != constants.XML_FALSE
 
     @classmethod
     def parse_value(
@@ -68,11 +69,12 @@ class ParserUtils:
         """Return a dictionary of qualified object names and their values for
         the given queue item."""
 
-        while len(objects) > position:
-            qname, value = objects.pop(position)
+        for qname, value in objects[position:]:
             if not cls.bind_object(params, meta, qname, value):
                 logger.warning("Unassigned parsed object %s", qname)
 
+        del objects[position:]
+
     @classmethod
     def bind_object(cls, params: Dict, meta: XmlMeta, qname: str, value: Any) -> bool:
         for var in meta.find_children(qname):
@@ -89,14 +91,10 @@ class ParserUtils:
         """Return a dictionary of qualified object names and their values for
         the given mixed content xml var."""
 
-        params[var.name] = []
-        while len(objects) > pos:
-            qname, value = objects.pop(pos)
-
-            if qname:
-                value = cls.prepare_generic_value(qname, value)
-
-            params[var.name].append(value)
+        params[var.name] = [
+            cls.prepare_generic_value(qname, value) for qname, value in objects[pos:]
+        ]
+        del objects[pos:]
 
     @classmethod
     def bind_var(cls, params: Dict, var: XmlVar, value: Any) -> bool:
@@ -111,10 +109,11 @@ class ParserUtils:
         """
         if var.init:
             if var.list_element:
-                if var.name not in params:
-                    params[var.name] = []
-
-                params[var.name].append(value)
+                items = params.get(var.name)
+                if items is None:
+                    params[var.name] = [value]
+                else:
+                    items.append(value)
             elif var.name not in params:
                 params[var.name] = value
             else:
@@ -136,10 +135,11 @@ class ParserUtils:
         value = cls.prepare_generic_value(qname, value)
 
         if var.list_element:
-            if var.name not in params:
-                params[var.name] = []
-
-            params[var.name].append(value)
+            items = params.get(var.name)
+            if items is None:
+                params[var.name] = [value]
+            else:
+                items.append(value)
         elif var.name in params:
             previous = params[var.name]
             if previous.qname:
@@ -176,13 +176,14 @@ class ParserUtils:
             return False
 
         if var.list_element:
-            if var.name not in params:
-                params[var.name] = []
+            items = params.get(var.name)
+            if items is None:
+                params[var.name] = items = []
 
             if txt:
-                params[var.name].insert(0, txt)
+                items.insert(0, txt)
             if tail:
-                params[var.name].append(tail)
+                items.append(tail)
         else:
             previous = params.get(var.name, None)
             generic = AnyElement(
@@ -262,13 +263,14 @@ class ParserUtils:
         params[var.name][qname] = cls.parse_any_attribute(value, ns_map)
 
     @classmethod
-    def prepare_generic_value(cls, qname: str, value: Any) -> Any:
+    def prepare_generic_value(cls, qname: Optional[str], value: Any) -> Any:
         """Prepare parsed value before binding to a wildcard field."""
 
-        if not is_dataclass(value):
-            value = AnyElement(qname=qname, text=converter.serialize(value))
-        elif not isinstance(value, (AnyElement, DerivedElement)):
-            value = DerivedElement(qname=qname, value=value)
+        if qname:
+            if not is_dataclass(value):
+                value = AnyElement(qname=qname, text=converter.serialize(value))
+            elif not isinstance(value, (AnyElement, DerivedElement)):
+                value = DerivedElement(qname=qname, value=value)
 
         return value
 
@@ -280,12 +282,10 @@ class ParserUtils:
         If content is just whitespace return None, otherwise preserve
         the original content.
         """
-        if value is not None:
-            clean_value = value.strip()
-            if not clean_value:
-                value = None
+        if value and value.strip():
+            return value
 
-        return value
+        return None
 
     @classmethod
     def parse_any_attributes(cls, attrs: Dict, ns_map: Dict) -> Dict:
@@ -305,10 +305,10 @@ class ParserUtils:
     @classmethod
     def fetch_any_children(cls, position: int, objects: List) -> List:
         """Fetch the children of a wildcard node."""
-        children = []
-        while len(objects) > position:
-            _, value = objects.pop(position)
-            children.append(value)
+        children = [value for _, value in objects[position:]]
+
+        del objects[position:]
+
         return children
 
     @classmethod
diff --git a/xsdata/formats/dataclass/serializers/mixins.py b/xsdata/formats/dataclass/serializers/mixins.py
index 945fc262..2ef0e1c0 100644
--- a/xsdata/formats/dataclass/serializers/mixins.py
+++ b/xsdata/formats/dataclass/serializers/mixins.py
@@ -1,5 +1,4 @@
-from dataclasses import dataclass
-from dataclasses import field
+import abc
 from typing import Any
 from typing import Dict
 from typing import Generator
@@ -31,8 +30,7 @@ class XmlWriterEvent:
     END = "end"
 
 
-@dataclass
-class XmlWriter:
+class XmlWriter(abc.ABC):
     """
     A consistency wrapper for sax content handlers.
 
@@ -42,24 +40,48 @@ class XmlWriter:
       element is starting in order to build the current element's
       namespace context correctly.
     - Prepares values for serialization.
-
-    :param config: Configuration instance
-    :param output: Output text stream
-    :param ns_map: User defined namespace prefix-URI map
     """
 
-    config: SerializerConfig
-    output: TextIO
-    ns_map: Dict = field(default_factory=dict)
-
-    # Scope vars
-    handler: ContentHandler = field(init=False)
-    in_tail: bool = field(init=False, default=False)
-    tail: Optional[str] = field(init=False, default=None)
-    attrs: Dict = field(init=False, default_factory=dict)
-    ns_context: List[Dict] = field(init=False, default_factory=list)
-    pending_tag: Optional[Tuple] = field(init=False, default=None)
-    pending_prefixes: List[List] = field(init=False, default_factory=list)
+    __slots__ = (
+        "config",
+        "output",
+        "ns_map",
+        "handler",
+        "in_tail",
+        "tail",
+        "attrs",
+        "ns_context",
+        "pending_tag",
+        "pending_prefixes",
+    )
+
+    def __init__(
+        self,
+        config: SerializerConfig,
+        output: TextIO,
+        ns_map: Dict,
+    ):
+        """
+        :param config: Configuration instance
+        :param output: Output text stream
+        :param ns_map: User defined namespace prefix-URI map
+        """
+        self.config = config
+        self.output = output
+        self.ns_map = ns_map
+
+        self.in_tail = False
+        self.tail: Optional[str] = None
+        self.attrs: Dict = {}
+        self.ns_context: List[Dict] = []
+        self.pending_tag: Optional[Tuple] = None
+        self.pending_prefixes: List[List] = []
+
+        self.handler = self.initialize_handler()
+
+    @abc.abstractmethod
+    def initialize_handler(self) -> ContentHandler:
+        """Initialize the content handler instance."""
 
     def write(self, events: Generator):
         """
diff --git a/xsdata/formats/dataclass/serializers/writers/lxml.py b/xsdata/formats/dataclass/serializers/writers/lxml.py
index 6b271f17..5f25493c 100644
--- a/xsdata/formats/dataclass/serializers/writers/lxml.py
+++ b/xsdata/formats/dataclass/serializers/writers/lxml.py
@@ -1,6 +1,5 @@
-from dataclasses import dataclass
-from dataclasses import field
 from typing import Generator
+from xml.sax.handler import ContentHandler
 
 from lxml.etree import tostring
 from lxml.sax import ElementTreeContentHandler
@@ -8,7 +7,6 @@ from lxml.sax import ElementTreeContentHandler
 from xsdata.formats.dataclass.serializers.mixins import XmlWriter
 
 
-@dataclass
 class LxmlEventWriter(XmlWriter):
     """
     :class:`~xsdata.formats.dataclass.serializers.mixins.XmlWriter`
@@ -19,19 +17,18 @@ class LxmlEventWriter(XmlWriter):
     to the output stream. Despite that since it's lxml it's still
     pretty fast and has better support for special characters and
     encodings than native python.
-
-    :param config: Configuration instance
-    :param output: Output text stream
-    :param ns_map: User defined namespace prefix-URI map
     """
 
-    handler: ElementTreeContentHandler = field(
-        init=False, default_factory=ElementTreeContentHandler
-    )
+    __slots__ = ()
+
+    def initialize_handler(self) -> ContentHandler:
+        return ElementTreeContentHandler()
 
     def write(self, events: Generator):
         super().write(events)
 
+        assert isinstance(self.handler, ElementTreeContentHandler)
+
         xml = tostring(
             self.handler.etree,
             encoding=self.config.encoding,
diff --git a/xsdata/formats/dataclass/serializers/writers/native.py b/xsdata/formats/dataclass/serializers/writers/native.py
index 235d2693..b3499dcf 100644
--- a/xsdata/formats/dataclass/serializers/writers/native.py
+++ b/xsdata/formats/dataclass/serializers/writers/native.py
@@ -1,11 +1,12 @@
-from dataclasses import dataclass
-from dataclasses import field
+from typing import Dict
+from typing import TextIO
+from xml.sax.handler import ContentHandler
 from xml.sax.saxutils import XMLGenerator
 
+from xsdata.formats.dataclass.serializers.config import SerializerConfig
 from xsdata.formats.dataclass.serializers.mixins import XmlWriter
 
 
-@dataclass
 class XmlEventWriter(XmlWriter):
     """
     :class:`~xsdata.formats.dataclass.serializers.mixins.XmlWriter`
@@ -14,19 +15,23 @@ class XmlEventWriter(XmlWriter):
     Based on the native python :class:`xml.sax.saxutils.XMLGenerator`
     with support for indentation. Converts sax events directly to xml
     output without storing intermediate result to memory.
-
-    :param config: Configuration instance
-    :param output: Output text stream
-    :param ns_map: User defined namespace prefix-URI map
     """
 
-    # Score vars
-    handler: XMLGenerator = field(init=False)
-    current_level: int = field(default=0, init=False)
-    pending_end_element: bool = field(default=False, init=False)
+    __slots__ = ("current_level", "pending_end_element")
+
+    def __init__(self, config: SerializerConfig, output: TextIO, ns_map: Dict):
+        """
+        :param config: Configuration instance
+        :param output: Output text stream
+        :param ns_map: User defined namespace prefix-URI map
+        """
+        super().__init__(config, output, ns_map)
+
+        self.current_level = 0
+        self.pending_end_element = False
 
-    def __post_init__(self):
-        self.handler = XMLGenerator(
+    def initialize_handler(self) -> ContentHandler:
+        return XMLGenerator(
             out=self.output,
             encoding=self.config.encoding,
             short_empty_elements=True,
diff --git a/xsdata/models/enums.py b/xsdata/models/enums.py
index 2f585a6d..ebe8e77a 100644
--- a/xsdata/models/enums.py
+++ b/xsdata/models/enums.py
@@ -1,3 +1,4 @@
+import sys
 from decimal import Decimal
 from enum import Enum
 from pathlib import Path
@@ -51,10 +52,10 @@ __STANDARD_NAMESPACES__ = {ns.uri: ns for ns in Namespace}
 class QNames:
     """Common qualified names."""
 
-    XSI_NIL = f"{{{Namespace.XSI.uri}}}nil"
-    XSI_TYPE = f"{{{Namespace.XSI.uri}}}type"
-    XSI_SCHEMA_LOCATION = f"{{{Namespace.XSI.uri}}}schemaLocation"
-    XSI_NO_NAMESPACE_SCHEMA_LOCATION = (
+    XSI_NIL = sys.intern(f"{{{Namespace.XSI.uri}}}nil")
+    XSI_TYPE = sys.intern(f"{{{Namespace.XSI.uri}}}type")
+    XSI_SCHEMA_LOCATION = sys.intern(f"{{{Namespace.XSI.uri}}}schemaLocation")
+    XSI_NO_NAMESPACE_SCHEMA_LOCATION = sys.intern(
         f"{{{Namespace.XSI.uri}}}noNamespaceSchemaLocation"
     )
 
@@ -242,9 +243,9 @@ __DataTypeQNameIndex__ = {str(dt): dt for dt in DataType}
 class EventType:
     """XmlParsing event types."""
 
-    START = "start"
-    START_NS = "start-ns"
-    END = "end"
+    START = sys.intern("start")
+    START_NS = sys.intern("start-ns")
+    END = sys.intern("end")
 
 
 class Tag:
diff --git a/xsdata/utils/collections.py b/xsdata/utils/collections.py
index f0c8b4a4..9ebf31c5 100644
--- a/xsdata/utils/collections.py
+++ b/xsdata/utils/collections.py
@@ -64,12 +64,6 @@ def first(items: Iterator) -> Any:
     return next(items, None)
 
 
-def concat(*args: Iterable) -> Iterator:
-    """Concatenate iterables into a single iterator."""
-    for arg in args:
-        yield from arg
-
-
 def map_key(dictionary: Dict, search: Any) -> Any:
     """Find and return they key for given search value."""
     for key, value in dictionary.items():
diff --git a/xsdata/utils/constants.py b/xsdata/utils/constants.py
index e3bbaeb9..91cf9105 100644
--- a/xsdata/utils/constants.py
+++ b/xsdata/utils/constants.py
@@ -1,3 +1,4 @@
+import sys
 from typing import Any
 from typing import Dict
 from typing import Sequence
@@ -7,6 +8,9 @@ EMPTY_MAP: Dict = {}
 EMPTY_SEQUENCE: Sequence = []
 EMPTY_TUPLE: Tuple = ()
 
+XML_FALSE = sys.intern("false")
+XML_TRUE = sys.intern("true")
+
 
 def return_true(*_: Any) -> bool:
     """A dummy function that always returns true."""
@@ -16,14 +20,3 @@ def return_true(*_: Any) -> bool:
 def return_input(obj: Any) -> Any:
     """A dummy function that always returns input."""
     return obj
-
-
-class DateFormat:
-    DATE = "%Y-%m-%d%z"
-    TIME = "%H:%M:%S%z"
-    DATE_TIME = "%Y-%m-%dT%H:%M:%S%z"
-    G_DAY = "---%d%z"
-    G_MONTH = "--%m%z"
-    G_MONTH_DAY = "--%m-%d%z"
-    G_YEAR = "%Y%z"
-    G_YEAR_MONTH = "%Y-%m%z"


Test patch:
diff --git a/tests/fixtures/books/fixtures.py b/tests/fixtures/books/fixtures.py
index 5e18ca58..9c54a4b1 100644
--- a/tests/fixtures/books/fixtures.py
+++ b/tests/fixtures/books/fixtures.py
@@ -56,3 +56,39 @@ events = [
     ('end', 'book', '\n    ', '\n'),
     ('end', '{urn:books}books', '\n  ', None)
 ]
+
+events_default_ns = [
+    ("start-ns", None, "urn:books"),
+    ("start", "{urn:books}books", {}, {None: "urn:books"}),
+    ("start-ns", None, ""),
+    ("start", "book", {"id": "bk001", "lang": "en"}, {None: ""}),
+    ("start", "author", {}, {None: ""}),
+    ("end", "author", "Hightower, Kim", "\n    "),
+    ("start", "title", {}, {None: ""}),
+    ("end", "title", "The First Book", "\n    "),
+    ("start", "genre", {}, {None: ""}),
+    ("end", "genre", "Fiction", "\n    "),
+    ("start", "price", {}, {None: ""}),
+    ("end", "price", "44.95", "\n    "),
+    ("start", "pub_date", {}, {None: ""}),
+    ("end", "pub_date", "2000-10-01", "\n    "),
+    ("start", "review", {}, {None: ""}),
+    ("end", "review", "An amazing story of nothing.", "\n  "),
+    ("end", "book", "\n    ", "\n  "),
+    ("start-ns", None, ""),
+    ("start", "book", {"id": "bk002", "lang": "en"}, {None: ""}),
+    ("start", "author", {}, {None: ""}),
+    ("end", "author", "Nagata, Suanne", "\n    "),
+    ("start", "title", {}, {None: ""}),
+    ("end", "title", "Becoming Somebody", "\n    "),
+    ("start", "genre", {}, {None: ""}),
+    ("end", "genre", "Biography", "\n    "),
+    ("start", "price", {}, {None: ""}),
+    ("end", "price", "33.95", "\n    "),
+    ("start", "pub_date", {}, {None: ""}),
+    ("end", "pub_date", "2001-01-10", "\n    "),
+    ("start", "review", {}, {None: ""}),
+    ("end", "review", "A masterpiece of the fine art of gossiping.", "\n  "),
+    ("end", "book", "\n    ", "\n"),
+    ("end", "{urn:books}books", "\n  ", None),
+]
\ No newline at end of file
diff --git a/tests/fixtures/models.py b/tests/fixtures/models.py
index 60289cb9..d703d804 100644
--- a/tests/fixtures/models.py
+++ b/tests/fixtures/models.py
@@ -1,5 +1,9 @@
-from dataclasses import dataclass, field
-from typing import List, Dict, Union, Optional
+from dataclasses import dataclass
+from dataclasses import field
+from typing import Dict
+from typing import List
+from typing import Optional
+from typing import Union
 from xml.etree.ElementTree import QName
 
 
@@ -43,18 +47,20 @@ class ExtendedType:
 
 @dataclass
 class ChoiceType:
-    choice: List[object] = field(metadata={
-        "type": "Elements",
-        "choices": (
-            {"name": "a", "type": TypeA},
-            {"name": "b", "type": TypeB},
-            {"name": "int", "type": int},
-            {"name": "int2", "type": int, "nillable": True},
-            {"name": "float", "type": float},
-            {"name": "qname", "type": QName},
-            {"name": "tokens", "type": List[int], "tokens": True},
-        )
-    })
+    choice: List[object] = field(
+        metadata={
+            "type": "Elements",
+            "choices": (
+                {"name": "a", "type": TypeA},
+                {"name": "b", "type": TypeB},
+                {"name": "int", "type": int},
+                {"name": "int2", "type": int, "nillable": True},
+                {"name": "float", "type": float},
+                {"name": "qname", "type": QName},
+                {"name": "tokens", "type": List[int], "tokens": True},
+            ),
+        }
+    )
 
 
 @dataclass
@@ -87,16 +93,19 @@ class SequentialType:
 
 
 @dataclass
-class MixedType:
-    x: int
-    y: str
+class Span:
+    class Meta:
+        name = "span"
+
+    content: str
+
+
+@dataclass
+class Paragraph:
+    class Meta:
+        name = "p"
+
     content: List[object] = field(
         default_factory=list,
-        metadata=dict(
-            type="Wildcard",
-            namespace="##any",
-            mixed=True,
-            min_occurs=0,
-            max_occurs=9223372036854775807,
-        ),
+        metadata=dict(type="Wildcard", namespace="##any", mixed=True),
     )
diff --git a/tests/formats/dataclass/parsers/handlers/test_lxml.py b/tests/formats/dataclass/parsers/handlers/test_lxml.py
index 4dd494d1..19ad991c 100644
--- a/tests/formats/dataclass/parsers/handlers/test_lxml.py
+++ b/tests/formats/dataclass/parsers/handlers/test_lxml.py
@@ -5,6 +5,7 @@ from tests import fixtures_dir
 from tests.fixtures.books import Books
 from tests.fixtures.books.fixtures import books
 from tests.fixtures.books.fixtures import events
+from tests.fixtures.books.fixtures import events_default_ns
 from xsdata.exceptions import XmlHandlerError
 from xsdata.formats.dataclass.parsers.handlers import LxmlEventHandler
 from xsdata.formats.dataclass.parsers.handlers import LxmlSaxHandler
@@ -21,6 +22,12 @@ class LxmlEventHandlerTests(TestCase):
         self.assertEqual({"brk": "urn:books"}, self.parser.ns_map)
         self.assertEqual(events, self.parser.events)
 
+    def test_parse_with_default_ns(self):
+        path = fixtures_dir.joinpath("books/books_default_ns.xml")
+        self.assertEqual(books, self.parser.from_path(path, Books))
+        self.assertEqual({None: "urn:books"}, self.parser.ns_map)
+        self.assertEqual(events_default_ns, self.parser.events)
+
     def test_parse_with_xinclude(self):
         path = fixtures_dir.joinpath("books/books-xinclude.xml")
         ns_map = {"brk": "urn:books", "xi": "http://www.w3.org/2001/XInclude"}
@@ -57,6 +64,12 @@ class LxmlSaxHandlerTests(TestCase):
         self.assertEqual({"brk": "urn:books"}, self.parser.ns_map)
         self.assertEqual(events, self.parser.events)
 
+    def test_parse_with_default_ns(self):
+        path = fixtures_dir.joinpath("books/books_default_ns.xml")
+        self.assertEqual(books, self.parser.from_path(path, Books))
+        self.assertEqual({None: "urn:books"}, self.parser.ns_map)
+        self.assertEqual(events_default_ns, self.parser.events)
+
     def test_parse_from_memory(self):
         path = fixtures_dir.joinpath("books/books.xml")
         self.assertEqual(books, self.parser.from_bytes(path.read_bytes(), Books))
@@ -69,11 +82,7 @@ class LxmlSaxHandlerTests(TestCase):
 
     @mock.patch.object(RecordParser, "end")
     def test_flush_normalizes_data_frames(self, mock_end):
-        queue = []
-        objects = []
-        handler = LxmlSaxHandler(
-            parser=self.parser, clazz=Books, queue=queue, objects=objects
-        )
+        handler = LxmlSaxHandler(parser=self.parser, clazz=Books)
         handler.data_frames.append(([], []))
         handler.flush_next = "value"
         handler.flush()
@@ -84,8 +93,8 @@ class LxmlSaxHandlerTests(TestCase):
 
         mock_end.assert_has_calls(
             [
-                mock.call(queue, objects, "value", None, None),
-                mock.call(queue, objects, "value", "ab", ""),
+                mock.call(handler.queue, handler.objects, "value", None, None),
+                mock.call(handler.queue, handler.objects, "value", "ab", ""),
             ]
         )
         self.assertEqual(2, mock_end.call_count)
diff --git a/tests/formats/dataclass/parsers/handlers/test_native.py b/tests/formats/dataclass/parsers/handlers/test_native.py
index 838a3cf8..c6cd2111 100644
--- a/tests/formats/dataclass/parsers/handlers/test_native.py
+++ b/tests/formats/dataclass/parsers/handlers/test_native.py
@@ -5,6 +5,7 @@ from tests import fixtures_dir
 from tests.fixtures.books import Books
 from tests.fixtures.books.fixtures import books
 from tests.fixtures.books.fixtures import events
+from tests.fixtures.books.fixtures import events_default_ns
 from xsdata.exceptions import XmlHandlerError
 from xsdata.formats.dataclass.parsers.handlers import XmlEventHandler
 from xsdata.formats.dataclass.parsers.handlers import XmlSaxHandler
@@ -14,18 +15,25 @@ from xsdata.formats.dataclass.parsers.nodes import RecordParser
 class XmlEventHandlerTests(TestCase):
     def setUp(self):
         self.parser = RecordParser(handler=XmlEventHandler)
-        self.fixture = fixtures_dir.joinpath("books/books.xml")
 
     def test_parse(self):
-        self.assertEqual(books, self.parser.from_path(self.fixture, Books))
+        path = fixtures_dir.joinpath("books/books.xml")
+        self.assertEqual(books, self.parser.from_path(path, Books))
         self.assertEqual({"brk": "urn:books"}, self.parser.ns_map)
         self.assertEqual(events, self.parser.events)
 
+    def test_parse_with_default_ns(self):
+        path = fixtures_dir.joinpath("books/books_default_ns.xml")
+        self.assertEqual(books, self.parser.from_path(path, Books))
+        self.assertEqual({None: "urn:books"}, self.parser.ns_map)
+        self.assertEqual(events_default_ns, self.parser.events)
+
     def test_parse_with_xinclude_raises_exception(self):
         self.parser.config.process_xinclude = True
+        path = fixtures_dir.joinpath("books/books.xml")
 
         with self.assertRaises(XmlHandlerError) as cm:
-            self.parser.from_path(self.fixture, Books)
+            self.parser.from_path(path, Books)
 
         self.assertEqual(
             "XmlEventHandler doesn't support xinclude elements.", str(cm.exception)
@@ -44,24 +52,32 @@ class XmlEventHandlerTests(TestCase):
 class SaxHandlerTests(TestCase):
     def setUp(self):
         self.parser = RecordParser(handler=XmlSaxHandler)
-        self.fixture = fixtures_dir.joinpath("books/books.xml")
 
     def test_parse(self):
-        self.assertEqual(books, self.parser.from_path(self.fixture, Books))
+        path = fixtures_dir.joinpath("books/books.xml")
+        self.assertEqual(books, self.parser.from_path(path, Books))
         self.assertEqual({"brk": "urn:books"}, self.parser.ns_map)
         self.assertEqual(events, self.parser.events)
 
+    def test_parse_with_default_ns(self):
+        path = fixtures_dir.joinpath("books/books_default_ns.xml")
+        self.assertEqual(books, self.parser.from_path(path, Books))
+        self.assertEqual({None: "urn:books"}, self.parser.ns_map)
+        self.assertEqual(events_default_ns, self.parser.events)
+
     @mock.patch.object(RecordParser, "end")
     @mock.patch.object(RecordParser, "start")
     def test_parse_returns_none_if_objects_empty(self, mock_start, mock_end):
+        path = fixtures_dir.joinpath("books/books.xml")
         handler = XmlSaxHandler(parser=self.parser, clazz=Books)
-        self.assertIsNone(handler.parse(self.fixture.as_uri()))
+        self.assertIsNone(handler.parse(path.as_uri()))
 
     def test_parse_with_xinclude_raises_exception(self):
         self.parser.config.process_xinclude = True
+        path = fixtures_dir.joinpath("books/books.xml")
 
         with self.assertRaises(XmlHandlerError) as cm:
-            self.parser.from_path(self.fixture, Books)
+            self.parser.from_path(path, Books)
 
         self.assertEqual(
             "XmlSaxHandler doesn't support xinclude elements.", str(cm.exception)
diff --git a/tests/formats/dataclass/parsers/test_nodes.py b/tests/formats/dataclass/parsers/test_nodes.py
index dd6d23fe..1331efa6 100644
--- a/tests/formats/dataclass/parsers/test_nodes.py
+++ b/tests/formats/dataclass/parsers/test_nodes.py
@@ -1,5 +1,4 @@
 import copy
-from dataclasses import dataclass
 from dataclasses import make_dataclass
 from typing import Any
 from typing import Union
@@ -8,14 +7,16 @@ from unittest.case import TestCase
 
 from tests.fixtures.books import BookForm
 from tests.fixtures.books import Books
-from tests.fixtures.models import MixedType
+from tests.fixtures.models import ExtendedType
+from tests.fixtures.models import Paragraph
+from tests.fixtures.models import SequentialType
 from tests.fixtures.models import TypeA
+from tests.fixtures.models import TypeB
 from tests.fixtures.models import TypeC
 from tests.fixtures.models import UnionType
 from xsdata.exceptions import ParserError
 from xsdata.exceptions import XmlContextError
 from xsdata.formats.dataclass.context import XmlContext
-from xsdata.formats.dataclass.models.elements import XmlMeta
 from xsdata.formats.dataclass.models.elements import XmlType
 from xsdata.formats.dataclass.models.generics import AnyElement
 from xsdata.formats.dataclass.models.generics import DerivedElement
@@ -38,23 +39,6 @@ from xsdata.utils.testing import XmlMetaFactory
 from xsdata.utils.testing import XmlVarFactory
 
 
-def add_attr(x, *args):
-    x["x"] = 1
-
-
-def add_text(x, *args):
-    x["y"] = "2"
-    return True
-
-
-def add_child(x, *args):
-    x["z"] = 3.3
-
-
-def add_content(x, *args):
-    x["content"] = 3
-
-
 class ElementNodeTests(FactoryTestCase):
     def setUp(self) -> None:
         super().setUp()
@@ -69,44 +53,22 @@ class ElementNodeTests(FactoryTestCase):
             ns_map={},
         )
 
-    @mock.patch.object(ParserUtils, "bind_objects")
-    @mock.patch.object(ParserUtils, "bind_wild_content")
-    @mock.patch.object(ParserUtils, "bind_content")
-    @mock.patch.object(ParserUtils, "bind_attrs")
-    def test_bind(
-        self,
-        mock_bind_attrs,
-        mock_bind_content,
-        mock_bind_wild_content,
-        mock_bind_objects,
-    ):
-        mock_bind_attrs.side_effect = add_attr
-        mock_bind_content.side_effect = add_text
-        mock_bind_objects.side_effect = add_child
-
+    def test_bind(self):
         node = ElementNode(
             position=0,
-            meta=self.context.build(TypeC),
+            meta=self.context.build(SequentialType),
             context=self.context,
             config=ParserConfig(),
-            attrs={"a": "b"},
+            attrs={"a": "b", "a0": "0"},
             ns_map={"ns0": "xsdata"},
         )
 
-        objects = [1, 2, 3]
+        objects = [("x1", 1), ("x2", 2), ("x2", 3)]
+        expected = SequentialType(a0="0", a1={"a": "b"}, x0=1, x1=[1], x2=[2, 3])
 
-        self.assertTrue(node.bind("foo", "text", "tail", objects))
+        self.assertTrue(node.bind("foo", "1", "tail", objects))
         self.assertEqual("foo", objects[-1][0])
-        self.assertEqual(TypeC(1, "2", 3.3), objects[-1][1])
-
-        mock_bind_attrs.assert_called_once_with(
-            mock.ANY, node.meta, node.attrs, node.ns_map
-        )
-        mock_bind_content.assert_called_once_with(
-            mock.ANY, node.meta, "text", node.ns_map
-        )
-        mock_bind_objects.assert_called_once_with(mock.ANY, node.meta, 0, objects)
-        self.assertEqual(0, mock_bind_wild_content.call_count)
+        self.assertEqual(expected, objects[-1][1])
 
     def test_bind_with_derived_element(self):
         node = ElementNode(
@@ -125,63 +87,35 @@ class ElementNodeTests(FactoryTestCase):
         self.assertEqual("foo", objects[-1][0])
         self.assertEqual(DerivedElement("foo", TypeA(2)), objects[-1][1])
 
-    @mock.patch.object(XmlMeta, "find_any_wildcard")
-    @mock.patch.object(ParserUtils, "bind_objects")
-    @mock.patch.object(ParserUtils, "bind_wild_content")
-    @mock.patch.object(ParserUtils, "bind_content")
-    @mock.patch.object(ParserUtils, "bind_attrs")
-    def test_bind_with_wildcard_var(
-        self,
-        mock_bind_attrs,
-        mock_bind_content,
-        mock_bind_wild_content,
-        mock_bind_objects,
-        mock_find_any_wildcard,
-    ):
-        mock_bind_attrs.side_effect = add_attr
-        mock_bind_content.return_value = False
-        mock_bind_wild_content.side_effect = add_text
-        mock_bind_objects.side_effect = add_child
-        mock_find_any_wildcard.return_value = XmlVarFactory.create(
-            xml_type=XmlType.WILDCARD, qname="b", name="b"
-        )
-
+    def test_bind_with_wildcard_var(self):
         node = ElementNode(
             position=0,
-            meta=self.context.build(TypeC),
+            meta=self.context.build(ExtendedType),
             context=self.context,
             config=ParserConfig(),
             attrs={"a": "b"},
             ns_map={"ns0": "xsdata"},
         )
 
-        objects = [1, 2, 3]
+        objects = [("a", "1"), ("b", "2")]
+        expected = ExtendedType(
+            a="1",
+            wildcard=AnyElement(
+                text="text",
+                tail="tail",
+                children=[AnyElement(qname="b", text="2")],
+                attributes={"a": "b"},
+            ),
+        )
 
         self.assertTrue(node.bind("foo", "text", "tail", objects))
         self.assertEqual("foo", objects[-1][0])
-        self.assertEqual(TypeC(1, "2", 3.3), objects[-1][1])
-
-        mock_bind_attrs.assert_called_once_with(
-            mock.ANY, node.meta, node.attrs, node.ns_map
-        )
-        mock_bind_content.assert_called_once_with(
-            mock.ANY, node.meta, "text", node.ns_map
-        )
-        mock_bind_objects.assert_called_once_with(mock.ANY, node.meta, 0, objects)
-
-    @mock.patch.object(ParserUtils, "bind_objects")
-    @mock.patch.object(ParserUtils, "bind_content")
-    @mock.patch.object(ParserUtils, "bind_attrs")
-    def test_bind_with_mixed_flag_true(
-        self, mock_bind_attrs, mock_bind_content, mock_bind_objects
-    ):
-        mock_bind_attrs.side_effect = add_attr
-        mock_bind_content.side_effect = add_text
-        mock_bind_objects.side_effect = add_child
+        self.assertEqual(expected, objects[-1][1])
 
+    def test_bind_with_mixed_flag_true(self):
         node = ElementNode(
             position=0,
-            meta=self.context.build(TypeC),
+            meta=self.context.build(TypeB),
             context=self.context,
             config=ParserConfig(),
             attrs={"a": "b"},
@@ -189,53 +123,32 @@ class ElementNodeTests(FactoryTestCase):
             mixed=True,
         )
 
-        objects = []
+        objects = [("x", 1), ("y", "a")]
         self.assertTrue(node.bind("foo", "text", "   ", objects))
         self.assertEqual(1, len(objects))
+        self.assertEqual(TypeB(x=1, y="a"), objects[-1][1])
 
-        objects = []
+        objects = [("x", 1), ("y", "a")]
         self.assertTrue(node.bind("foo", "text", " tail ", objects))
         self.assertEqual(2, len(objects))
         self.assertEqual(None, objects[-1][0])
         self.assertEqual(" tail ", objects[-1][1])
 
-    @mock.patch.object(ParserUtils, "bind_mixed_objects")
-    @mock.patch.object(ParserUtils, "bind_wild_content")
-    @mock.patch.object(ParserUtils, "bind_attrs")
-    def test_bind_with_mixed_content_var(
-        self,
-        mock_bind_attrs,
-        mock_bind_wild_content,
-        mock_bind_mixed_objects,
-    ):
-        mock_bind_attrs.side_effect = add_attr
-        mock_bind_wild_content.side_effect = add_text
-        mock_bind_mixed_objects.side_effect = add_content
-
+    def test_bind_with_mixed_content_var(self):
         node = ElementNode(
             position=0,
-            meta=self.context.build(MixedType),
+            meta=self.context.build(Paragraph),
             context=self.context,
             config=ParserConfig(),
             attrs={"a": "b"},
             ns_map={"ns0": "xsdata"},
         )
-        wildcard = node.meta.find_any_wildcard()
-        objects = [1, "2", 3]
-
+        objects = [("a", 1)]
+        expected = Paragraph(content=["text", AnyElement(qname="a", text="1"), "tail"])
         self.assertTrue(node.bind("foo", "text", "tail", objects))
 
         self.assertEqual("foo", objects[-1][0])
-        self.assertEqual(MixedType(1, "2", 3), objects[-1][1])
-
-        mock_bind_attrs.assert_called_once_with(
-            mock.ANY, node.meta, node.attrs, node.ns_map
-        )
-
-        mock_bind_wild_content.assert_called_once_with(
-            mock.ANY, wildcard, "text", "tail", node.attrs, node.ns_map
-        )
-        mock_bind_mixed_objects.assert_called_once_with(mock.ANY, wildcard, 0, objects)
+        self.assertEqual(expected, objects[-1][1])
 
     def test_child(self):
         var = XmlVarFactory.create(xml_type=XmlType.ELEMENT, qname="a", types=(TypeC,))
@@ -296,7 +209,7 @@ class ElementNodeTests(FactoryTestCase):
             xml_type=XmlType.ELEMENT,
             name="a",
             qname="a",
-            types=(TypeC, MixedType),
+            types=(TypeC, TypeB),
         )
         attrs = {"a": "b"}
         ns_map = {"ns0": "xsdata"}
@@ -685,7 +598,6 @@ class NodeParserTests(TestCase):
         self.parser = NodeParser()
 
     def test_parse(self):
-        @dataclass
         class TestHandler(XmlHandler):
             def parse(self, source: Any) -> Any:
                 return Books()
@@ -831,14 +743,14 @@ class NodeParserTests(TestCase):
         self.assertIsNone(result)
         self.assertEqual(0, len(queue))
 
-    def test_start_prefix_mapping(self):
+    def test_register_namespace(self):
         parser = NodeParser()
-        parser.start_prefix_mapping("bar", "foo")
-        parser.start_prefix_mapping("bar", "exists")
+        parser.register_namespace("bar", "foo")
+        parser.register_namespace("bar", "exists")
         self.assertEqual({"bar": "foo"}, parser.ns_map)
 
-        parser.start_prefix_mapping(None, "a")
+        parser.register_namespace(None, "a")
         self.assertEqual({"bar": "foo", None: "a"}, parser.ns_map)
 
-        parser.start_prefix_mapping(None, "b")
+        parser.register_namespace(None, "b")
         self.assertEqual({"bar": "foo", None: "a"}, parser.ns_map)
diff --git a/tests/formats/dataclass/parsers/test_utils.py b/tests/formats/dataclass/parsers/test_utils.py
index 6a48a5db..8e379684 100644
--- a/tests/formats/dataclass/parsers/test_utils.py
+++ b/tests/formats/dataclass/parsers/test_utils.py
@@ -381,6 +381,9 @@ class ParserUtilsTests(FactoryTestCase):
         self.assertEqual(dict(a=["first", "txt", "tail", "tail"]), params)
 
     def test_prepare_generic_value(self):
+        actual = ParserUtils.prepare_generic_value(None, 1)
+        self.assertEqual(1, actual)
+
         actual = ParserUtils.prepare_generic_value("a", 1)
         expected = AnyElement(qname="a", text="1")
         self.assertEqual(expected, actual)
diff --git a/tests/formats/dataclass/parsers/test_xml.py b/tests/formats/dataclass/parsers/test_xml.py
index 1cd16a4c..eb902e7d 100644
--- a/tests/formats/dataclass/parsers/test_xml.py
+++ b/tests/formats/dataclass/parsers/test_xml.py
@@ -1,5 +1,4 @@
 from unittest import mock
-from unittest.case import TestCase
 
 from tests.fixtures.books import Books
 from xsdata.formats.dataclass.models.elements import XmlType
diff --git a/tests/formats/dataclass/serializers/test_mixins.py b/tests/formats/dataclass/serializers/test_mixins.py
index 3fde8d5d..b8df6427 100644
--- a/tests/formats/dataclass/serializers/test_mixins.py
+++ b/tests/formats/dataclass/serializers/test_mixins.py
@@ -1,5 +1,6 @@
 from io import StringIO
 from unittest import TestCase
+from xml.sax.handler import ContentHandler
 from xml.sax.saxutils import XMLGenerator
 
 from xsdata.exceptions import XmlWriterError
@@ -10,18 +11,25 @@ from xsdata.models.enums import DataType
 from xsdata.models.enums import QNames
 
 
+class XmlWriterImpl(XmlWriter):
+
+    __slots__ = ()
+
+    def initialize_handler(self) -> ContentHandler:
+        return XMLGenerator(
+            self.output,
+            encoding="UTF-8",
+            short_empty_elements=True,
+        )
+
+
 class XmlWriterTests(TestCase):
     def setUp(self) -> None:
         super().setUp()
 
         output = StringIO()
         config = SerializerConfig()
-        self.writer = XmlWriter(output=output, config=config)
-        self.writer.handler = XMLGenerator(
-            output,
-            encoding="UTF-8",
-            short_empty_elements=True,
-        )
+        self.writer = XmlWriterImpl(output=output, config=config, ns_map={})
 
     def test_write(self):
         events = iter(
diff --git a/tests/formats/dataclass/serializers/test_xml.py b/tests/formats/dataclass/serializers/test_xml.py
index a6c860f5..5bd430eb 100644
--- a/tests/formats/dataclass/serializers/test_xml.py
+++ b/tests/formats/dataclass/serializers/test_xml.py
@@ -1,14 +1,14 @@
-from dataclasses import dataclass
-from dataclasses import field
 from dataclasses import make_dataclass
 from typing import Generator
-from typing import List
 from unittest import TestCase
 from xml.etree.ElementTree import QName
 
 from tests.fixtures.books import BookForm
 from tests.fixtures.datatypes import Telephone
+from tests.fixtures.models import Paragraph
 from tests.fixtures.models import SequentialType
+from tests.fixtures.models import Span
+from tests.fixtures.models import TypeA
 from xsdata.exceptions import SerializerError
 from xsdata.exceptions import XmlContextError
 from xsdata.formats.dataclass.models.elements import XmlType
@@ -262,8 +262,6 @@ class XmlSerializerTests(TestCase):
             types=(BookForm,),
         )
         ebook = make_dataclass("eBook", [], bases=(BookForm,))
-
-        value = ebook(id="123")
         expected = [
             (XmlWriterEvent.START, "a"),
             (XmlWriterEvent.ATTR, "id", "123"),
@@ -272,7 +270,7 @@ class XmlSerializerTests(TestCase):
             (XmlWriterEvent.END, "a"),
         ]
 
-        result = self.serializer.write_value(value, var, "xsdata")
+        result = self.serializer.write_value(ebook(id="123"), var, "xsdata")
         self.assertIsInstance(result, Generator)
         self.assertEqual(expected, list(result))
 
@@ -283,14 +281,13 @@ class XmlSerializerTests(TestCase):
             name="a",
             types=(BookForm,),
         )
-        ebook = make_dataclass("eBook", [])
-        value = ebook()
+        value = TypeA(1)
 
         result = self.serializer.write_value(value, var, "xsdata")
         with self.assertRaises(SerializerError) as cm:
             list(result)
 
-        self.assertEqual("eBook is not derived from BookForm", str(cm.exception))
+        self.assertEqual("TypeA is not derived from BookForm", str(cm.exception))
 
     def test_write_element(self):
         var = XmlVarFactory.create(xml_type=XmlType.ELEMENT, qname="a")
@@ -541,30 +538,8 @@ class XmlSerializerTests(TestCase):
         self.assertEqual(expected, list(actual))
 
     def test_render_mixed_content(self):
-        @dataclass
-        class Span:
-            class Meta:
-                name = "span"
-
-            content: str
-
-        @dataclass
-        class Example:
-            class Meta:
-                name = "p"
-
-            content: List[object] = field(
-                default_factory=list,
-                metadata=dict(
-                    type="Wildcard",
-                    namespace="##any",
-                    mixed=True,
-                    min_occurs=0,
-                    max_occurs=9223372036854775807,
-                ),
-            )
 
-        obj = Example()
+        obj = Paragraph()
         obj.content.append(AnyElement(qname="b", text="Mr."))
         obj.content.append(Span("chris"))
         obj.content.append("!")
@@ -573,7 +548,7 @@ class XmlSerializerTests(TestCase):
         result = self.serializer.render(obj).splitlines()
         self.assertEqual("<p><b>Mr.</b><span>chris</span>!</p>", result[1])
 
-        obj = Example()
+        obj = Paragraph()
         obj.content.append("Hi ")
         obj.content.append(AnyElement(qname="b", text="Mr."))
         obj.content.append(Span("chris"))
diff --git a/tests/formats/dataclass/test_context.py b/tests/formats/dataclass/test_context.py
index 4dda83a2..1eefe32e 100644
--- a/tests/formats/dataclass/test_context.py
+++ b/tests/formats/dataclass/test_context.py
@@ -1,11 +1,14 @@
 import copy
-from dataclasses import fields
 from dataclasses import make_dataclass
 from unittest import mock
 
 from tests.fixtures.artists import Artist
+from tests.fixtures.artists import BeginArea
 from tests.fixtures.books import BookForm
 from tests.fixtures.books import BooksForm
+from tests.fixtures.models import ChoiceType
+from tests.fixtures.models import TypeA
+from tests.fixtures.models import UnionType
 from xsdata.formats.dataclass.context import XmlContext
 from xsdata.models.enums import DataType
 from xsdata.utils.testing import FactoryTestCase
@@ -68,8 +71,8 @@ class XmlContextTests(FactoryTestCase):
         self.assertEqual(BooksForm, self.ctx.find_type("{urn:books}BookForm"))
 
     def test_find_type_by_fields(self):
-        field_names = {f.name for f in fields(BookForm)}
-        self.assertEqual(BookForm, self.ctx.find_type_by_fields(field_names))
+        field_names = {"id", "name", "sort-name"}
+        self.assertEqual(BeginArea, self.ctx.find_type_by_fields(field_names))
 
         field_names.update({"please", "dont", "exist"})  # Test matching with more
         self.assertIsNone(self.ctx.find_type_by_fields(field_names))
@@ -100,3 +103,13 @@ class XmlContextTests(FactoryTestCase):
         self.assertTrue(self.ctx.is_derived(a(), a))
         self.assertFalse(self.ctx.is_derived(a(), d))
         self.assertFalse(self.ctx.is_derived(None, d))
+
+    def test_build_recursive(self):
+        self.ctx.build_recursive(ChoiceType)
+        self.assertEqual(3, len(self.ctx.cache))
+
+        self.ctx.build_recursive(TypeA)
+        self.assertEqual(3, len(self.ctx.cache))
+
+        self.ctx.build_recursive(UnionType)
+        self.assertEqual(6, len(self.ctx.cache))
diff --git a/tests/formats/dataclass/test_elements.py b/tests/formats/dataclass/test_elements.py
index 2d0b2c72..4927b914 100644
--- a/tests/formats/dataclass/test_elements.py
+++ b/tests/formats/dataclass/test_elements.py
@@ -1,12 +1,10 @@
-from dataclasses import make_dataclass
-from typing import Iterator
 from unittest import mock
 from unittest.case import TestCase
 from xml.etree.ElementTree import QName
 
 from tests.fixtures.models import ChoiceType
 from tests.fixtures.models import ExtendedType
-from tests.fixtures.models import MixedType
+from tests.fixtures.models import Paragraph
 from tests.fixtures.models import TypeA
 from tests.fixtures.models import TypeB
 from tests.fixtures.models import TypeC
@@ -129,10 +127,9 @@ class XmlValTests(TestCase):
 
 class XmlMetaTests(TestCase):
     def setUp(self) -> None:
-        a = make_dataclass("a", [])
         self.context = XmlContext()
         self.meta = XmlMetaFactory.create(
-            clazz=a,
+            clazz=TypeA,
             qname="a",
             choices=[],
             wildcards=[],
@@ -144,7 +141,7 @@ class XmlMetaTests(TestCase):
     def test__repr__(self):
         expected = (
             "XmlMeta("
-            "clazz=<class 'types.a'>, "
+            "clazz=<class 'tests.fixtures.models.TypeA'>, "
             "qname='a', "
             "source_qname='a', "
             "nillable=False, "
@@ -227,6 +224,6 @@ class XmlMetaTests(TestCase):
         self.assertEqual("b", next(meta.find_children("b")).qname)
         self.assertEqual("int", next(meta.find_children("int")).qname)
 
-        meta = self.context.build(MixedType)
+        meta = self.context.build(Paragraph)
         self.assertEqual("content", next(meta.find_children("404")).qname)
         self.assertTrue(next(meta.find_children("content")).is_wildcard)
diff --git a/tests/utils/test_collections.py b/tests/utils/test_collections.py
index 921d9cb4..205e068a 100644
--- a/tests/utils/test_collections.py
+++ b/tests/utils/test_collections.py
@@ -1,3 +1,4 @@
+import itertools
 from typing import Generator
 from typing import Hashable
 from unittest import TestCase
@@ -10,16 +11,6 @@ class CollectionsTests(TestCase):
         self.assertEqual(-1, collections.find([0, 1], 2))
         self.assertEqual(1, collections.find([0, 1], 1))
 
-    def test_concat(self):
-        def generator():
-            yield 7
-            yield 8
-            yield 9
-
-        result = collections.concat((1, 2, 3), [4, 5, 6], generator())
-        self.assertIsInstance(result, Generator)
-        self.assertEqual(list(range(1, 10)), list(result))
-
     def test_map_key(self):
         dictionary = {"a": "b"}