Jump to content

XML


hamza

Recommended Posts

HelloAnyone tell me about my questions My questions are given below:1) I donot understand completely #PCDATA & #CDATA.2) Why we use DTD .3) Why we use Schema.4) Difference between Schema & DTD . Waiting Yours reply OK Hamza Khalid

Link to comment
Share on other sites

1. PCDATA stands for Parsed Character DATA. Elements that carry PCDATA are supposed to be parsed as their type's name implies. Because they are parsed, all XML rules apply to them, they are accessable and so on. CDATA stands for Character DATA. Opposed to elements with PCDATA, elements with CDATA or CDATA sections are not parsed by the parser and therefore XML rules don't apply to them and they are not acessable. You can only grab the whole CDATA element's content, but not part of it as with the PCDATA elements.2. We use DTD to define what could be wriiten in what spot of an XML document. Or in other words- we specify rules for the XML document's syntax. The most typical example is XHTML. It's DTD only allows elements that the browser knows how to render and only allows them at spots where the browser knows what to do. Any other things are not allowed.3. The same as with DTD.4. The main difference is that XML Schema is based on XML, or in other words- it uses XML syntax and it's rules. DTD on the other hand is more SGML based or text based.... or something wierd, I don't know.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...