Answer
DTD - Document Type Definition defines the legal building blocks of an XML document.
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.
Answer
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.
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
- CDATA The value is character data
- ID The value is a unique id
- IDREF The value is the id of another element
- IDREFS The value is a list of other ids
Schema means the organization and the structure of a database.
E.g.: An XML schema is a description of XML document. It is expressed in terms of constraints on the structure and content of documents.
XML XML DTD
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.
What is a CDATA section in XML?
Answer
CDATA - (Unparsed) Character Data
The term CDATA is used when you dont want some text data to be parsed by the XML parser.
CDATA - (Unparsed) Character Data
The term CDATA is used when you dont want some text data to be parsed by the XML parser.
A CDATA section starts with "":
XML - CDATA section in XML
What is a CDATA section in XML?
The CDATA section of XML is used to describe the text that should not be parsed by the XML parser.
The characters like "<" ">" are not supported in XML
"<" will cause an error by the parser. Because the parser identifies < as the starting character for an element.
"<" will cause an error by the parser. Because the parser identifies < as the starting character for an element.
Any text that is included in CDATA section is ignored by the parser.
Example :
< and > are used to enclose an element in XML "]]>
Example :
< and > are used to enclose an element in XML "]]>

0 Comments:
Post a Comment