aspose file tools*
The moose likes XML and Related Technologies and the fly likes xml and dtd Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "xml and dtd" Watch "xml and dtd" New topic

xml and dtd

siva kumar r

Joined: Feb 06, 2001
Posts: 7
Can i display the data of an xml file in the browser with the
help of a dtd file alone.If it is possible give me a small example.
what is the exact role played by a dtd.
Ajith Kallambella

Joined: Mar 17, 2000
Posts: 5782
DTD represents the structure of an XML document. Things such as what are the elements, how the elements are nested, how child elements are ordered, what is the cardinality and grouping etc are contained in the DTD which helps serve as the document constraint. An important point to note is that DTD is not the data, but just the representation of data structure. If you are from OO background, DTD is an anology to class definition while XML is the instance of the class ie., an object.
So, an XML document is what you would like to display in a browser. Without such document, DTD by itself has no meaning.
Ajith Kallambella M.
Sun Certified Programmer for the Java�2 Platform.

Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
jQuery in Action, 2nd edition
subject: xml and dtd
Similar Threads
OO Parsers
Can I have both DTD and schema delcaration for single XML file?
XML file based on DTD
form-validation cannot find DTD?