File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes XML Document Preambles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML Document Preambles" Watch "XML Document Preambles" New topic

XML Document Preambles

Richard Robbins
Ranch Hand

Joined: Mar 07, 2001
Posts: 66
The book that I am using to learn XML states a few times that every XML document with an external DTD or schema must have a preamble that points to the content model. However, I have seen a couple of XML documents that don't have a preamble. Is there another method of declaring the content model besides using a preamble? Also, does anyone know of an online tutorial I can use to figure out how to make use of XML document information within my Java program?

Richard Robbins is one of the founders of, a resource for free website templates and Photoshop tutorials. He also consults for an online boutique selling baptism dresses and christening gowns.
Mapraputa Is
Leverager of our synergies

Joined: Aug 26, 2000
Posts: 10065
Richard, what your book means by �a preamble�? The closest official term I can think about is �prolog� = �XML declaration� + �DOCTYPE declaration�. Is it what the book mean? If XML document has a DTD (either external or internal), it has to be declared in <!DOCTYPE declaration
But it is also possible for an XML document not to have any accotiated DTD or Schema � then it doesn�t have <!DOCTYPE declaration (= preamble?)
Some ideas about Java&XML:
Processing XML with Java
XML, Java, databases and the Web
Java XML Application Categories

Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
I agree. Here's the link:
subject: XML Document Preambles
jQuery in Action, 3rd edition