Quick question...
At work, we do business with a third party. They 'deliver' XML to us over HTML, which is parsed and processed by a servlet.
I suspect some of the delivered XML is malformed. However, i'm not the typical XML guru, so i'm not if i should be as mad at that third party as i'd like to be :)
The issue: (element names/values are changed ;) )
1) <ELEMENT> </ELEMENT>
Not quite proper XML if u ask me :)
The, the parser expects an entity named nbsp here. Adding a mock entity would be quite idiotic if u ask me. Besides that, i have no control over the xml files anyways.
Possible fixes: &nbsp; would be ok, enclosing the chars in a CDATA block is even better if you ask me.
I could, of course, alter the servlet and preprocess the String of XML, and fixing the malformed bits before actually introducing the XML to the parser (SAX).
The latter option is not that time-consuming, however, i suspect the XML to be just plain wrong.
So, should i get totally mad at the company delivering the so called XML ?
Any advice is welcome :)
Thanks