Skip to content

Download Schemas

Generating from remote resources is not a great idea, the cli includes a command to download schemas and wsdl locally. The command will download any included schemas recursively.

$ xsdata download --help
========= xsdata v24.11 / Python 3.11.10 / Platform linux =========

Usage: xsdata download [OPTIONS] SOURCE

  Download a schema or a definition locally with all its dependencies.

Options:
  -o, --output PATH  Output directory, default cwd
  --help             Show this message and exit.

Example

❯ xsdata download https://www.w3.org/Math/XMLSchema/mathml3/mathml3.xsd -o ~/schemas
========= xsdata v24.6.1 / Python 3.11.8 / Platform linux =========

Setting base path to https:/www.w3.org/Math/XMLSchema/mathml3
Fetching https://www.w3.org/Math/XMLSchema/mathml3/mathml3.xsd
Fetching https://www.w3.org/Math/XMLSchema/mathml3/mathml3-content.xsd
Fetching https://www.w3.org/Math/XMLSchema/mathml3/mathml3-strict-content.xsd
Writing /home/chris/schemas/mathml3-strict-content.xsd
Writing /home/chris/schemas/mathml3-content.xsd
Fetching https://www.w3.org/Math/XMLSchema/mathml3/mathml3-presentation.xsd
Writing /home/chris/schemas/mathml3-presentation.xsd
Fetching https://www.w3.org/Math/XMLSchema/mathml3/mathml3-common.xsd
Writing /home/chris/schemas/mathml3-common.xsd
Writing /home/chris/schemas/mathml3.xsd