How you define DTD in XML?

How you define DTD in XML?

DTD is stands for Document Type Definition.This is the oldest schema for XML.It is present every where in the XML 1.0.I have you reasons those make DTD limited. 1.It does not new features of XML.Like:namespaces.2.It lacks expressiveness.We can\'t captured the formal aspects of XML doc.3.DTD uses a custom non-XML syntax,inherited from SGML.

Example:

<!ELEMENT people_list (person*)>

<!ELEMENT person (name, age?, sex?, phoneno?)>

<!ELEMENT name (#PCDATA)>

<!ELEMENT age (#PCDATA)>

<!ELEMENT sex (#PCDATA)>

<!ELEMENT phoneno (#PCDATA)>



By:Vivek
Date:2014-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related XML Subjective Links

XML Subjective interview questions and answers for experienced and fresher