Naive XML Bindings for python
xsData is a complete data binding library for python allowing developers to access and use XML and JSON documents as simple objects rather than using DOM.
The code generator supports XML schemas, DTD, WSDL definitions, XML & JSON documents. It produces simple dataclasses with type hints and simple binding metadata.
The included XML and JSON parser/serializer are highly optimized and adaptable, with multiple handlers and configuration properties.
xsData is constantly tested against the W3C XML Schema 1.1 test suite.
Getting started
$ # Install all dependencies
$ pip install xsdata[cli,lxml,soap]
$ # Generate models
$ xsdata generate tests/fixtures/primer/order.xsd --package tests.fixtures.primer
>>> from tests.fixtures.primer import PurchaseOrder
>>> from xsdata.formats.dataclass.parsers import XmlParser
>>>
>>> parser = XmlParser()
>>> order = parser.parse("tests/fixtures/primer/sample.xml", PurchaseOrder)
>>> order.bill_to
Usaddress(name='Robert Smith', street='8 Oak Avenue', city='Old Town', state='PA', zip=Decimal('95819'), country='US')
Check the documentation for more ✨✨✨
Features
Code Generator
- XML Schemas 1.0 & 1.1
- WSDL 1.1 definitions with SOAP 1.1 bindings
- DTD external definitions
- Directly from XML and JSON Documents
- Extensive configuration to customize output
- Pluggable code writer for custom output formats
Default Output
- Pure python dataclasses with metadata
- Type hints with support for forward references and unions
- Enumerations and inner classes
- Support namespace qualified elements and attributes
Data Binding
- XML and JSON parser, serializer
- PyCode serializer
- Handlers and Writers based on lxml and native xml python
- Support wildcard elements and attributes
- Support xinclude statements and unknown properties
- Customize behaviour through config
Changelog: 26.10 (2026-10-16)
Security
- Disable external entity resolution in LxmlEventHandler by default (#1228)
Fixes
- Fix wrapper binding when collection item element name is reused (#1224)
- Fix KeyError in is_binding_model when models_package is not set (#1219)
- Validate calendar date in XmlDate.from_string (#1227)
- Add charset to the SOAP client content-type header (#1231)
- Skip xsi:nil for a present instance of a type without content (#1234)
- Skip None text when binding wildcard list elements (#1237)
Features
Metadata
Release files for xsdata 26.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| xsdata-26.10.tar.gz | 356.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xsdata-26.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 599.0 kB
Release files / xsdata-26.10.tar.gz
| Download URL | xsdata-26.10.tar.gz |
|---|---|
| Size | 356.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4bc944d9fa3955f84ecebb83c677e2f681687c002a777731a21104e8360a7522
|
|
BLAKE2b-256 checksum How to use checksums |
f3b87b301b80494a750dba431d3d0a800e0e80c91903e8891eef78ead8f95120
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / xsdata-26.10-py3-none-any.whl
| Download URL | xsdata-26.10-py3-none-any.whl |
|---|---|
| Size | 243.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
37a697d60db1396a0431750486744a7e0491fd60669751d95e3ede08f034e0c6
|
|
BLAKE2b-256 checksum How to use checksums |
07fe5a9698cef0850317de2a8f3c50519fbaa2cc4225d15bcfe9922e4dff8380
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency log