Issues when making use of XML (part 1)

XML is quite common nowadays, especially in the application integration business that I am involved in. However, I still see companies making big mistakes when they decide to start using XML (for example as the exchange format with their business partners). This post is about one of the mistakes I noticed during one of my projects.

Not using a schema (XSD) or DTD

In this situation I contacted a business partner to ask them how the XML file/message should look like if I want to communicate with them. The reply to the question was just an example XML file with the text: ‘it must look like this’. In this case there is no way to check if the XML is valid according to their specs and it is unknown if it can be processed by the other party.
Although they might check the xml very well when they process it, it would be much better if I could do some checking at our side. It would reduce the network traffic and increase the performance a lot. Also using Object-XML mapping tools like JAXB become difficult (or even impossible) which may working with the XML files harder in a Java environment.
The final issue I want to mention is that you can’t use XML mapping tools like Altova Mapforce. These tools really make your life easier if you have to transform one XML to another XML format. But they are based on XSD’s so without these you can’t create your XSLT for mapping purposes.
There might be a lot more disadvantages but I think the point is clear: when using XML files make sure you have an XSD for them.

About Pascal Alma

Pascal is a senior IT consultant and has been working in IT since 1997. He is monitoring the latest development in new technologies (Mobile, Cloud, Big Data) closely and particularly interested in Java open source tool stacks, cloud related technologies like AWS and mobile development like building iOS apps with Swift. Specialties: Java/JEE/Spring Amazon AWS API/REST Big Data Continuous Delivery Swift/iOS
This entry was posted in XML/ XSD/ XSLT and tagged . Bookmark the permalink.