XML | DTD |
---|
XML is namespace aware. | DTD is not namespace aware. |
It is written in the XML language. | It is not written in XML language nor does it have a significant DTD language. |
It eliminates the need to learn any other language. | It allows to learn another language. |
XML implements strong typing. | DTD lacks strong typing. |
It has derived and built in data type. | It does not have derived and built in data type. |
The XML schema cannot be defined inline. | DTD is defined inline. |
It helps the document by loading the complete content of the document and create its complete hierarchical tree in the memory.
It parses the document on the event based triggers. The complete document is not loaded in the memory.
It parses the document in the same manner as the DOM but in an easier manner.
It parses the document in the same manner as the SAX but in an efficient way.
It parses the XML that is based on the expression and is used extensively in the conjunction with XSLT.
A java library parses XML, Xpath and XSLT by using the Java Collections Framework that provides support for DOM, SAX and JAXP.