Published by Fabian on 05 Jun 2008 at 09:44 am
A disguised XML file
In a current project we are working on XML files coming from a partner company. Readers of my blog can identify that its most likely the same project as here. Unfortunately the XSD is really loose.
Everything is type="xs:string", has minOccurs="0" and maxOccurs="unbounded". And if I say everything I mean all roughly 50 tags that are defined. Okay at least we have some structural information with sequences that might be there or not
Luckily that is not that big issue as I dont need to parse it but some poor JAXB has to do that. And my poor Hibernate has to create amazing database structures to deal with that loose XML. Anyways I didn’t want to make a blog post for this alone. But today I got the confirmation on the filename of these XML files. Watch out:
PREFIX.Timestamp.txt
really, they are named txt instead of xml. With them not having an XML identifier line (<?xml version="1.0" encoding="utf-8" ?>), not having a real XSD and not having an XML filename, this isn’t really XML, is it?
Come on, who builds such a thing… as business interface…

Robert on 30 Jun 2008 at 12:46 pm #
For related stories, see http://thedailywtf.com/
Jim on 01 Feb 2010 at 5:07 pm #
Hi Fabian,
Finally, how do you manage the “amazing database structure” that has been created by JAXB / HyperJAXB (due to the complexity of the XSD)?
Thanks!