File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes DTD and XML Schema Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "DTD and XML Schema" Watch "DTD and XML Schema" New topic
Author

DTD and XML Schema

Fisher Daniel
Ranch Hand

Joined: Sep 14, 2001
Posts: 582
Dear all,
DTD and XML Schema are used for validate the structure of xml.
When do we use DTD instead of XML Schema and vice versa?

thanks
daniel
Arun Prasath
Ranch Hand

Joined: Sep 17, 2003
Posts: 192
It depends upon your requirement.
DTD is not an XML document and its limited.
Schema is a XML document and it is extensible.
DTD doesnt support Namespaces but schema does.
DTD doesnt have many datatypes where as schema has 44 built in datatypes. and you can define your own datatypes.
The following Tutorialgives a good idea of Schema and the difference between them.
Hope this helps.


SCJP 1.4, SCDJWS , SCJA<br />I can do ALL things through CHRIST who strengthens me.
 
 
subject: DTD and XML Schema
 
Similar Threads
DTD v/s XSD
Can I have both DTD and schema delcaration for single XML file?
Different about DTD and XML Schema
referencing another xml
dtd | xml Schemas ?