Is starting to use CDATA a breaking change?
- by kicsit
For interaction with a customer's application we use XML documents. That is, we send an XML over HTTP and receive a response XML document the same way. The customer specified two XML schemata that describe the format of both the request and reply. All was working fine, until one day the customer started to use CDATA sections in the response XML. We set up our parser unmindful of CDATA sections, so we failed to interpret them.
My question is: Who made a mistake here? I tried to find an answer in the XML standards, but I'm still not sure. I think I cannot prescribe using or not using CDATA's in an XSD, is that right? If so, is it not enough to agree upon an XSD, but a separate agreement has to be made about CDATA sections? Or one is obliged to be prepared to parse CDATA and regular text as well?
I'm interested in both your personal views and official statements too. Thank you!