Page 1 of 1

Checking for CDATA section with XML Schema

Posted: Wed Dec 29, 2004 10:05 pm
by Juergen
Hi,

I'm working with the following XML data:
---
<book>
<title><![CDATA[A Book Title]]></title>
</book>
---

Is it possible to check for the existence of the <![CDATA[...]]> section with XML Schema and only accept it if the CDATA tag is present?

Thanks for any help.

Regards,
Juergen

Posted: Thu Dec 30, 2004 4:57 pm
by george
Hi Juergen,

No, you cannot do this. XML Schema does not distinguish between

<book>
<title><![CDATA[A Book Title]]></title>
</book>

and

<book>
<title><A Book Title</title>
</book>

Best Regards,
George