XML Rant

Sometimes I get almost too excited about XML. Last month I was escorted out of our conference as I interrupted a session to proclaim my love of XML. Watch my rant.

XML technology is something that we have worked tirelessly on for over 10 years, and we have grown to love it.

Over that time our feelings towards it have changed from “Fear” (when we learned of yet another way that XML is being used to represent information) to “Adoration” (when we discover a new format that is based on XML).

Here is why I love XML and his little brother JSON. After reading this I am sure that you will love them too!

1. XML is an Open Standard

XML is an open standard maintained by the W3C (JSON is also an open standard ). This is important as it means that data is not locked into any proprietary format. It is thus available to be used by any application. This can be either directly if the application supports it, or via a tool like FME.

Unfortunately, much of the world’s data remains locked in proprietary systems. If you are in this situation and you lose access to those systems then you have also lost access to your data.

2. XML is Easy to Read

37 formats in FME are based on XML.

37 formats in FME are XML-based. Click to Expand.

Reading XML is easy, and many tools can do it. For FME, we use the open source Xerces-C++ open source library.

Some say that XML is “human-readable” and that is true in that you can open your favorite editor and inspect it. The ability to visually inspect and understand the “raw” data is a boon to anyone who wants to develop tools to work with those documents.

To be clear I am talking about the simple task of reading. XML often gets a bad rap as people may get frustrated that their tool can’t work with, or understand, the data model.  To everyone out there building XML data models I strongly encourage you to “Keep it Simple!”

Remember that much of the reason you are putting data into XML is to make it OPEN. If you build an overly complex/rich data model, then you are also making your data more difficult to consume, which is much of the point of putting it in XML in the first place.

Indeed there are several XML-based formats supported by FME that we are so complex that no other software package is currently able to work with them.  Of course, as the data is in XML anyone with enough motivation could work with the data.

3. XML is Easy to Validate

XML Validator transformer

The XML Validator is one of 400+ transformers in FME.

Again great open source tools and libraries are the solution here. A web search reveals many online XML validation tools. A good online tool that I have used is www.xmlvalidation.com.  Xerces is what we use within FME, and it enables us to do two types of validation:

While things are getting better it still surprises me that how often we get invalid XML files. Please always ensure that the files that you are producing are valid. If you get a file that you are suspicious of, then use a tool such as the website above, or if you are an FME user then embed the validation at the start of your work flows. This could save you a bunch of time trying to work with an invalid file!

4. XML can Represent Any Kind of Data

XML: One format to rule them all!

XML, my precious.

When it comes to data, XML can be used to represent it all! One format to rule them all!

We have seen it used for many types of data from simple relational or tabular datasets, to complex data models such as AIXM which is designed to enable the management and distribution of Aeronautical Information Services (AIS) data.  We work with many other complex data models including, but not limited to, INSPIRE (Europe), and CityGML (Building and City Data) – here are links to FME webinars on CityGML and a couple on INSPIRE.

Again when defining new XML data models a friendly reminder to keep it as simple as possible.

5. XML / JSON is the Language of the Web

JSONThe world of web services and sensors is exploding. In this arena, communication is done almost exclusively with either XML or his little brother JSON. When building new web services today then I support JSON first and then XML.

I can’t think of a single web service that I can’t work with either of these formats. As a company that has spent a decade making industry leading XML and JSON technology this has made working with web services very simple.

6. XML Tools are Mature and Ready for Prime Time

A simple web search for “XML Tools and Libraries” reveals hundreds of tools and libraries. As our engine is in C++ we have made extensive use of Xerces. No matter what programming language you use you have many library to choose from. Pick your language for other reasons you may have and you can be sure that there will be good libraries for you to use.

7. XML Can Contain International Characters

Dale Lutz loves XML

Dale loves XML!

Even my good buddy Dale loves XML. He loves it because it has native support for international characters.

Long have we fought with international character sets at Safe, and with XML this is not a concern. It just works. Don’t believe me about Dale? Here is the proof!

How Real is XML?

When moving into new markets, or supporting new data sources, we almost immediately ask “Is this format XML-based?”

Why?

XML make it easier for FME support more formats in Japan.

XML make it easier for us support more Japanese formats.

At Safe the technology we have built is such that the effort to support a new XML / JSON data source is at least one order of magnitude easier than other formats. In most cases it just works. There is no effort.

This was evident when we recently discussed how to expand our support for formats in Japan. If the formats were XML then we knew that we could easily add them. If they weren’t, then the task for each format was much larger, if it was even possible at all.

Remember, even today there are still binary formats out there for which there is no spec. In other cases the spec is held tight by the vendor as a means of holding customers hostage.

Maybe someday all data will be in XML or JSON… (Silver bullet?)

The XML Challenge

I Love XMLLet me know how you feel about XML and JSON. If you have some data you are struggling with, then please send it to me at xml@safe.com

At Safe we believe that data should be free for you to use however, whenever, and wherever you want.

I am confident that we can help you with it. We look forward to the challenge of helping you.

At Safe we love XML and are sure you will too!

About Data AIS AIXM CityGML INSPIRE JSON Open Standard XML XML Validator

Don Murray

Don is the co-founder and President of Safe Software. Safe Software was founded originally doing work for the BC Government on a project sharing spatial data with the forestry industry. During that project Don and other co-founder, Dale Lutz, realized the need for a data integration platform like FME. When Don’s not raving about how much he loves XML, you can find Don working with the team at Safe to take the FME product to the next level. You will also find him on the road talking with customers and partners to learn more about what new FME features they’d like to see.

Comments

5 Responses to “7 Reasons to Love XML and its ‘Baby Brother’ JSON”

  1. Jason says:

    Interesting. Curious whether that order of magnitude benchmark holds up against formats such as GeoPackage which are SQLite-based and have an open schema. Is there something other than tooling (you already have a SQLite reader) that contributes to this ease of use? Fewer requirements for validation? ORM later easier to work with?

  2. Don says:

    Jason,

    Great comment and point. Indeed we welcome new formats built on any existing technology as it makes the task of adding a new reader and writer much simpler. SQLite being another open technology is a good choice for new formats compared with proprietary binary formats. We are also seeing a renewed interest in vendors using odbc technology as a way of providing an open gateway to data.

    I think it is also important to note that SQLite and odbc are “live” systems in which applications can directly run whereas XML is more of a data exchange system or stream for small pieces of data. Indeed I can imagine a system in which SQLite is the back end of a web service that uses XML or json to stream data between components.

    This is all good and shows the shackles of data being loosened. One comment in favor of XML is that the data is stand-alone and not dependent on any technology making it also perfect for archival purposes. I think I could easily write another blog on this! 😉

    Hope you are doing well.

    Don

  3. martin says:

    Spot on article and i couldnt agree more about xml, altouh it can be more verbose than JSON both xml and jason are great for data exchange and web services. Although I do use an xml editor for parsing xml its still a joy to write xml form scrtach in something as simple as notepad.
    http://www.xml-editor.info

  4. Don Murray says:

    Martin,

    Glad to meet another XML enthusiast. Another great thing about XML (other than its sheer beauty) is you can view it and create it with bare bones tools. Of course an editor with “xml” in its name sounds like a great thing too. The ability to be sure right in the editor that you are creating something valid is just one valuable use case.

    Thanks for your comments.

  5. Phil Chapman says:

    I love XML and I love people like you who are so passionate about Global Technology and are not afraid to point out the short comings of those that think they know the Industry.

    I LOVE PICK Man…!! Yeh, PICK the 50 year old this year, Multi-Value based Data and Applications Platform, “oh, you never heard of it”.
    They think your insane, try a sales pitch like that…

    However modern Multi-Value systems like our own MVS.. have one of the highest MIP’s Hardware to Processing output ratings of any Vendor Platform. Multi-User and Multi-Tasking they defined N0-SQL, SaaS, PaaS and IaaS solutions delivery for over 30 years. Then came XML.

    But when you take a look at the ‘modern’ XML methodology, you notice that it simply contains tags to describe the content in terms of what data is being described, just like our own Multi-Value DBMS.

    A Dynamic XML Hub was created a few years ago to exchange Data between disparate Data Stores in real-time, offering visibility of “case files” from different agencies within the UK legal system. Working a little too well, delivering information to courts in milliseconds upset lawyers who charge by the hour. You can’t please everybody.

    OK, MVS can fully capitalise on XML as a textual Data format across the internet. And as an open standard this makes MV DBMS’s compatible with office productivity tools MS Office, Open Office, Libre and Apples iWork. And XMPP is also pretty nice but the icing (frosting) on the cake, the chocolate sprinkles and dollop of fresh cream.

    XML has helped us embed our Cooperate/Banking level Mainframe Terminal interface into HTML. We write One Application that’s compatible with almost every other Application… and you can use it via a browser on any device regardless of OS or Type.

    We killed the App. We love XML too.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts