Joy of XML with proper tools

Spread the love
16 / 100
Reading Time: 2 minutes

I was doing a recruit platform, in Java, and within there I was currently writing the spec and mechanism for format definition file for IT Skills.

Then I came upon our good old friend XML and it’s companion, the grammar definition XSD (XML Schema definition). These two have a relationship: Since XML files in general must be validly constructed (not “broken”), the validation happens by checking programmatically a XML file against the rules in a XSD file.

The XSD itself is also a language, and it’s quite flexible: you can write your own custom grammars to validate XML against. So a question arises: How is XSD defined, then?

Just enough down the rabbit hole: XSD structure

Photo 1601408648796 349272138e57?ixlib=rb 1.2
Photo by Kyle Barr on Unsplash

I’d first written just a text file, ad hoc, about some of the learning I needed to do.

The file had tags, sure, but grammar was not yet there. In order to make the writing easier, it’s useful to have autocompletion in the text editor.

Needs so far:

  • valid XML
  • schema for XML captured as a XSD
  • a validator tool for XML – takes XSD, XML -> shows results
  • editor’s autocomplete mechanism for writing compliant XML
Photo 1593642533144 3d62aa4783ec?ixlib=rb 1.2
Photo by XPS on Unsplash

Facebook Comments Box

This site uses Akismet to reduce spam. Learn how your comment data is processed.