Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
 Discussion Forums
 HTML, XML, JavaScript...
 Software Reviews
 Editors,Others...
 Top100
 JavaScript Tutorials, ...
 Tutorials
 ASP, CSS, Databases...
 Discussion List
 FAQ, Roundup, Configure ...
 Authoring
 HTML, JavaScript, CSS...
 Design
 Layout, Navigation,...
 Graphics
 Tools, Colors, Images...
 Software
 Browsers, Editors, XML...
 Internet
 Domains, E-Commerce, ...
 WDVL Resources
  Intermdiate, Tutorials,...
 WDVL
 Discussion Lists, Top 100,...
 Technology Jobs


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Top 10 Articles
  1. Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
  2. JavaScript Tutorial for Programmers
  3. Design
  4. JavaScript Tutorial for Programmers - Objects
  5. JavaScript Tutorial for Programmers - JavaScript Grammar
  6. JavaScript Tutorial for Programmers - Versions of JavaScript
  7. Cascading Style Sheets
  8. JavaScript Tutorial for Programmers - Embedding JavaScript
  9. JavaScript Tutorial for Programmers - Functions
  10. Authoring JavaScript
Domain Name Lookup
Search to find the availability of a domain name. Just enter the complete domain name with extension (.com, .net, .edu)

The XML Declaration

March 29, 1999

To begin an XML document, it is a good idea to include the XML declaration as the very first line of the document. I say "good idea" because, though the XML declaration is optional, it is suggested by the W3C specification.

Essentially, the XML declaration is a processing instruction that notifies the processing agent that the following document has been marked up as an XML document. It will look something like the following:

<?xml version = "1.0"?>

We'll talk more about the gory details of processing instructions later, but we can at least explain how the XML declaration works.

All processing instructions, including the XML declaration, begin with <? and end with ?>. Following the initial <?, you will find the name of the processing instruction, which in this case is "xml".

The XML processing instruction, requires that you specify a version attribute and allows you to specify optional standalone and encoding attributes.

In its full regalia, the XML declaration might look like the following:

<?xml version	= "1.0"? 
standalone	= "yes" 
encoding	= "UTF-8"?>

The version Attribute

As we said before, if you do decide to use the optional XML declaration, you must define the version attribute. As of this writing, the current version of XML is 1.0. Note that if you include the optional attributes, version must be specified first.

The standalone Attribute

The standalone attribute specifies whether the document has any markup declarations that are defined in a separate document. Thus, if standalone is set to "yes", there will be no markup declarations in external DTDs. Setting it to "no" leaves the issue open. The document may or may not access external DTDs.

The encoding Attribute

All XML parsers must support 8-bit and 16-bit Unicode encoding corresponding to ASCII. However, XML parsers may support a larger set. You'll rarely need to work with this, so I'll simply refer you to section 4.3.3 in the XML Specification document where you can get a list of encoding types and more.

Data Versus Markup
Introduction to XML For Web Developers | Table of Contents
Elements


Up to => Home / Authoring / Languages / XML / Tutorials / Intro




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers