Skip to main content

A script to validate XML files for the game 'The Binding of Isaac: Rebirth'

Project description

isaac-xml-validator

This repo contains:

Using the Website

You can view the website here.

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.

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.

Add XSD as a validation Header

If you want to use the XSD files for external validation tools, for example as a live evaluation in VS Code with the "XML" extension by Red Hat, you can add the following line of code at the top of your .xml file:

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

Example for the "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" />	<!-- evaluates as 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>

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>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

isaac_xml_validator-1.1.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

isaac_xml_validator-1.1.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file isaac_xml_validator-1.1.1.tar.gz.

File metadata

  • Download URL: isaac_xml_validator-1.1.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.8.8 Windows/10

File hashes

Hashes for isaac_xml_validator-1.1.1.tar.gz
Algorithm Hash digest
SHA256 d0426eba6b835673127adee3e705dc66843e81391856037aa526cb86d9a23bb2
MD5 276aea934eee5192e6ebcf2c9c1f1f59
BLAKE2b-256 daabf1c9956e4ee8e14050cf35fc2bf31d495207a2d40b1b3eec24e7ac929f69

See more details on using hashes here.

File details

Details for the file isaac_xml_validator-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for isaac_xml_validator-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9173f459b939e9b4abab68a79797c77b519a789e712b4974748aeeef989c495b
MD5 34be72fcdd7ebeded4f568de81e13bd1
BLAKE2b-256 0e6f8ee3dcf0d20a59bed05edb702c023f09d26e2a78bcad18a766d866ae905e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page