XML provides the XML declaration to label documents as XML. : XML Declarations « Introduction « XML Tutorial

Home
XML Tutorial
1.Introduction
2.Namespace
3.XML Schema
4.XPath
5.XSLT stylesheet
XML Tutorial » Introduction » XML Declarations 
1.2.1.XML provides the XML declaration to label documents as XML.
A declaration must include the version, but the encoding and standalone attributes are optional.
The version, encoding, and standaloneattributes must be in that order.
The XML declaration must be right at the beginning of the file. 
A typical XML declaration looks like this

<?xml version='1.0' encoding='UTF-16' standalone='yes'?> 
<name first="Bond" 
      middle="James" 
      last="Last"/> 

An XML declaration can be as full as the previous one or as simple as: 

<?xml version='1.0'?> 
Because the XML declaration is a processing instruction and not an element, there is no closing tag.
1.2.XML Declarations
1.2.1.XML provides the XML declaration to label documents as XML.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.