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 software developer and architect. Pascal has been designing and building applications since 2001. He is particularly interested in Open Source toolstack (Mule, Spring Framework, JBoss) and technologies like Web Services, SOA and Cloud technologies. Lately he is having great fun by building iOS apps with Swift. Specialties: JEE AWS XML/XSD/XSLT Web Services/SOA Mule ESB/ WSO2 ESB Maven Cloud Technology Swift/ iOS
This entry was posted in XML/ XSD/ XSLT and tagged . Bookmark the permalink.