Skip to main content

isaac-xml-validator

This repo contains:

Using the Website

You can view the website here.

Usage in VSCode and Other IDEs

Most people create Binding of Isaac mods (and other software) using VSCode, which is a very nice text editor / IDE.

If you make a typo (or some other error) in your XML file, you can get VSCode to automatically show you the error with a little red squiggly line, which is really helpful. This is accomplished by specifying a link to the corresponding schema at the top of the file.

First, make sure that you have the XML extension by Red Hat installed. Next, add the following to the top of your XML file:

<?xml-model href="https://wofsauge.github.io/isaac-xml-validator/xsd/[NAME OF THE FILE].xsd" ?>

For example, this is how it would look for a "babies.xml" file:

<?xml-model href="https://wofsauge.github.io/isaac-xml-validator/xsd/babies.xsd" ?>
<babies root="gfx/Characters/Player2/">
  <baby id="0" name="Spider Baby" skin="000_Baby_Spider.png" />
  <baby id="1" name="Love Baby" skin="001_Baby_Love.pngz" /> <!-- shows an error, because the "skin" attribute doesn't contain a .png file, but a .pngz-->
  <baby id="2" name="Bloat Baby" skin="002_Baby_Bloat.png" />
</babies>

Note that by default, the XML extension caches the XSD files in the following location:

C:\Users\[username]\.lemminx\cache\https\wofsauge.github.io\isaac-xml-validator

You can remove this directory if you want to purge the cache to download any potentially updated XSD files.

Using the Python Script

The tool is published to PyPI, so you can install it via:

pip install isaac-xml-validator

Then, you can run it via:

isaac-xml-validator

By default, it will recursively scan for all XML files in the current working directory.

You will likely want to set up your repository so that the script runs in CI (e.g. GitHub Actions).

Usage in GitHub Actions

For most users, you will probably want to manually integrate the Python script into your existing lint routine. Alternatively, you can use a GitHub action that automatically invokes the script.

Creating New XSD Files

If you need to create new XSD files, you can import our common XML schema like this:

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsisaac="https://wofsauge.github.io/isaac-xml-validator">
  <xs:import schemaLocation="https://wofsauge.github.io/isaac-xml-validator/isaacTypes.xsd" namespace="https://wofsauge.github.io/isaac-xml-validator" />
  <xs:element name="Test">
    <xs:complexType>
      <xs:attribute name="root" type="xsisaac:pngFile" />
    </xs:complexType>
  </xs:element>
</xs:schema>

Release files for isaac-xml-validator 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for isaac-xml-validator 1.4.1
File Size Uploaded
isaac_xml_validator-1.4.1.tar.gz 12.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for isaac-xml-validator 1.4.1
File Interpreter ABI Platform
isaac_xml_validator-1.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.9 kB

Release files / isaac_xml_validator-1.4.1.tar.gz

Download URL isaac_xml_validator-1.4.1.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4ae9c25941cd312a435b953d84de1827270685eaeb727b9c6a89ce180604bb9e
BLAKE2b-256 checksum
How to use checksums
ab868ca05c468c410bb331d67c070079fbc54d4c5221726a50efd928c55b01ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.8.8 Windows/10

Release files / isaac_xml_validator-1.4.1-py3-none-any.whl

Download URL isaac_xml_validator-1.4.1-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9049182f90cb11d98af77ccd1d837841f235cc734cb8f98c2df5b8b736bc72a7
BLAKE2b-256 checksum
How to use checksums
0155e164d1cbc3ff5bd8d42a9d4f668242d8fe740e67021709d8b663c52c63e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.8.8 Windows/10

Release history Release notifications | RSS feed

1.16.0

2 release files

1.15.0

2 release files

1.14.0

2 release files

1.13.1

2 release files

1.13.0

2 release files

1.12.5

2 release files

1.12.4

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.9

2 release files

1.6.8

2 release files

1.6.7

2 release files

1.6.6

2 release files

1.6.5

2 release files

1.6.4

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.0

2 release files

This release

1.4.1 This release

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page