XML
  Home arrow XML arrow Page 6 - XML Basics (part 1)
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
XML

XML Basics (part 1)
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 3
    2001-07-23


    Table of Contents:
  • XML Basics (part 1)
  • A Little History
  • The Big Picture
  • The Hammer And The Chisel
  • Lights, Camera, Action!
  • Breaking It Down
  • Simply Element-ary
  • Anyone For Chicken?
  • To Attribute Or Not To Attribute...

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    XML Basics (part 1) - Breaking It Down
    ( Page 6 of 9 )

    Every XML document must begin with a declaration that states the version of XML being used; this declaration is also referred to as the "document prolog."

    <?xml version="1.0"?>
    This document prolog may also contain additional information, such as the document encoding, and whether the document is to be viewed in combination with external DTDs or other entities (as explained above, a DTD lays down the format for an XML document and can be used to verify whether or not it is valid.) Consequently, the document prolog can sometimes look like this,

    <?xml version="1.0" standalone="yes" ?>
    or this.

    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    The document prolog also contains a document type declaration, used to specify additional information about the document. This information typically includes the location of the DTD to use when validating the document (if there is one available), an optional list of entity declarations (more on this later), and the name of the root element of the document.

    A document type declaration usually looks like this:

    <!DOCTYPE rootElement DTDLocation [ entityDeclarations ] >
    A possible document type declaration for the movie review above might look like this:

    <!DOCTYPE review SYSTEM "http://www.somedomain.com/review.dtd">
    In this case, the document would be validated against the DTD located at http://www.somedomain.com/review.dtd

    If entity declarations are present, this might be modified to read

    <!DOCTYPE review SYSTEM "http://www.somedomain.com/review.dtd" [ <!ENTITY html "Hypertext Markup Language"> <!ENTITY xml "Extensible Markup Language"> ] >
    Entities will be discussed in detail in the second part of this article.

    This article copyright Melonfire 2001. All rights reserved.

     
     
    >>> More XML Articles          >>> More By icarus, (c) Melonfire
     

       

    XML ARTICLES

    - Flex Array Collection Sort and Filtering
    - The Flex Tree Control
    - Flex List Controls
    - Working with Flex and Datagrids
    - How to Set Up Podcasting and Vodcasting
    - Creating an RSS Reader Application
    - Building an RSS File
    - An Introduction to XUL Part 6
    - An Introduction to XUL Part 5
    - An Introduction to XUL Part 4
    - An Introduction to XUL Part 3
    - An Introduction to XUL Part 2
    - An Introduction to XUL Part 1
    - XML Matters: Practical XML Data Design and M...
    - Practical XML Data Design and Manipulation f...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek