Can one specify XML attribute values as CDATA ? If yes – what would be the schema for the same. If not – why is this limitation not addressed in XML ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No you cannot do this.
There’s a very fine line (and a very large debate) between what constitutes an attribute and what constitutes a child element. See here for example.
That given, the ‘limitation’ isn’t addressed in XML because it doesn’t exist. You always have the ability to put this data in a child element, and in fact I would go so far as to say that if you even have to think about this, an element is the correct structure.
Edit: More reading material