The <?xml ...?> Processing Instruction
This section describes the 'xml' processing instruction, which is required at the top of XML files. 'xml' processing instruction must have the 'version' attribute.
Every XML file must contain one "xml" processing instruction at the beginning of
the file to declare that this file is an XML file.
There is one required attribute for the "xml" processing instruction: version="n",
indicating the version number of the XML standard.
Valid attributes of the "xml" processing instruction are:
- version - A required attribute that specifies the version of the XML standard this XML file conforms to.
Currently, there are two versions of the XML standard available: 1.0 and 1.1.
- encoding - An optional attribute that specifies the character encoding schema used in this XML file.
Currently, there are many encodings supported by most XML applications:
UTF-8, UTF-16, ISO-10646-UCS-2, ISO-10646-UCS-4, ISO-8859-1, ..., ISO-8859-9, ISO-2022-JP, Shift_JIS, EUC-JP.
- standalone - An optional attribute that specifies if this XML file is self-contained or not.
If standalone="yes", this XML file is self-contained.
If standalone="no", this XML file is not self-contained.
A self-contained XML file can be safely processed without reading any additional markup declarations from external files.
Here is an example XML file that has all 3 attributes included in the "xml" processing instruction:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
In this tutorial book, we are learning XML version 1.0.
Table of Contents
About This Book
Introduction of XML (eXtensible Markup Language)
►XML File Syntax
Types of Information in XML Files
XML File Syntax Rules
►The <?xml ...?> Processing Instruction
dictionary.xml - A Simple XML Sample File
XML File Browsers
XML-JSON Document Conversion
DOM (Document Object Model) Programming Interface
SAX (Simple API for XML) Programming Interface
DTD (Document Type Definition) Introduction
Syntaxes of DTD Statements
Validating an XML Document against the Specified DTD Document Type
XSD (XML Schema Definition) Introduction
Syntaxes of XSD Statements
Validating XML Documents Against Specified XML Schemas
XSL (Extensible Stylesheet Language) Introduction
XSLT (XSL Transformations) Introduction
Java Implementation of XSLT
XPath (XML Path) Language
XSLT Elements as Programming Statements
Control and Generate XML Element in the Result
PHP Extensions for XML Manipulation
XML Notepad - XML Editor
XML Tools Plugin for Notepad++
XML Plugin Packages for Atom Editor
XML 1.1 Changes and Parsing Examples
Full Version in PDF/EPUB