XML DTD - Define DTD (Document Type definition).

Define DTD (Document Type definition).

DTD - Document Type Definition defines the legal building blocks of an XML document.

- It defines the document structure with a list of legal elements and attributes.
- XML DTD is a rule book that an XML document follows. Once DTD is ready, you can create number of XML documents following the same rules specified in the DTD. DTD can be internal or external DTD. The internal DTD is included in the XML document, while external DTD exists outside the content of the documents.

Explain DTD and schema.

- A DTD provides a list of the elements, attributes, comments, notes, and entities contained in an XML or HTML document and indicates their relationship with each other.
- The 'DOCTYPE' tells the browser that it is a Document Type Declaration.

Some commonly used attribute types are

1. CDATA The value is character data
2. ID The value is a unique id
3. IDREF The value is the id of another element
4. IDREFS The value is a list of other ids

Schema means the organization and the structure of a database.

Example : An XML schema is a description of XML document. It is expressed in terms of constraints on the structure and content of documents.

Define XML DTD.

XML DTD is a rule book that an XML document follows. Once DTD is ready, you can create number of XML documents following the same rules specified in the DTD. DTD can be internal or external DTD. The internal DTD is included in the XML document, while external DTD exists outside the content of the documents.
XML CDATA section - What is a CDATA section in XML?
XML CDATA section - The term CDATA is used when you dont want some text data to be parsed by the XML parser....
XSL - What is XSL?
XSL - XSL is a language for expressing style sheets. An XSL style sheet is a file that describes the way to display an XML document....
XML XQuery & XPATH - What is XQuery?
XML XQuery & XPATH - Xquery is a query language that is used to retrieve data from XML documents.....
Post your comment