What is XML DTDThe XML Document Type Definition is called the XML DTD. As the name implies, it define the structure of an XML document. If you need to have a particular structure for your XML document and want every user to create one based on that structure then you have to create a DTD for that structure and use it for validation of an XML document. An XML document is considered a valid document if it follows the structure defined in the DTD for that type of document.Know the syntax of the DTD would help you a lot to create one. There are tools available that would create the DTD for you if you have an XML document. With this method you can create a template of the DTD easily and then modify it according to your requirement. In a DTD, the ELEMENT defines and element and the child nodes are defined in the brackets. A sign like '+', '?', and '*' are used after the name of the child nodes in the DTD. These denote the number of times the child node should exist in the XML document. Attributes are defined using ATTLIST. The existence of an attribute is controlled by keywords like, #REQUIRED, #IMPLIED, #DEFAULT, and #FIXED. Many examples of DTD are available in the internet which can be used for learning the concept.
|
|
|||
|
||||
“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”
Copyright - © 2004 - 2019 - All Rights Reserved.