Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML Document Preambles

 
Richard Robbins
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
Thanks,
Richard
 
Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic