Understanding the DTD XML examplesKnowing the different components of a DTD file would help you to understand the concepts of DTD and XML very well. Consider the DTD example given below. <!ELEMENT books (book+) > The ELEMENT keyword is used to define an element in the DTD file. The word next to the ELMENT keyword is the name of the element that will be present in the XML file. After the element name some text will be available in the brackets. These are the names of the child nodes of that element. The different child nodes are separated by a comma. A plus sign after the node name indicates that it can be present one or more times within that element. Similarly sign like '?' and '*' are also used in it. Data types defined in the DTD are PCDATA and CDATA. A DTD can be embedded within an XML file or it can be separate in an external file.
|
|
|||
|
||||
“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”
Copyright - © 2004 - 2019 - All Rights Reserved.