tefra / xsdata

Naive XML & JSON Bindings for python
https://xsdata.readthedocs.io
MIT License
310 stars 56 forks source link

feat: Use the event writer to build element trees #1032

Closed tefra closed 2 months ago

tefra commented 2 months ago

📒 Description

The first impl was a disaster, because I thought the treebuilders from lxml and native python, could deal with sax events out of the box, but that wasn't the case. I had to reuse the EventContent handler we use for normal xml serialization in order to get a consistent output.

Unfortunately because of limitations with the python's ElementTree with namespaces and prefixes, the TreeSerializer only works with lxml.

Resolves #1028

🔗 What I've Done

Write a description of the steps taken to resolve the issue

💬 Comments

A place to write any comments to the reviewer.

🛫 Checklist

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.96%. Comparing base (eab6bb7) to head (510b2b9).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1032 +/- ## =========================================== - Coverage 100.00% 99.96% -0.04% =========================================== Files 117 115 -2 Lines 9272 9264 -8 Branches 2194 2190 -4 =========================================== - Hits 9272 9261 -11 - Misses 0 2 +2 - Partials 0 1 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud