Is starting to use CDATA a breaking change?

Posted by kicsit on Stack Overflow See other posts from Stack Overflow or by kicsit
Published on 2010-05-21T11:47:46Z Indexed on 2010/05/21 11:50 UTC
Read the original article Hit count: 167

Filed under:
|
|

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!

© Stack Overflow or respective owner

Related posts about Xml

Related posts about xml-schema