Joy of XML with proper tools

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 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 by XPS on Unsplash

Published by jukkasoft

Me: a code enthusiasta, technology optimist, but also a realist. In my blog something like 80% of the articles are technology related - mostly in English and Finnish. I like to envision and ponder about things, how life could be, what we are doing wrong today, and so on. "Invented" a facebook -like system in 2000, as a short product pamphlet. Haven't yet realized the 20+ ideas that might have become big things. Maybe learning this skill one of these days!

Leave a comment

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: