Why XML language is used?

XML (Extensible Markup Language) is a markup language similar to HTML, but without predefined tags to use. Instead, you define your own tags designed specifically for your needs. This is a powerful way to store data in a format that can be stored, searched, and shared. Most importantly, since the fundamental format of XML is standardized, if you share or transmit XML across systems or platforms, either locally or over the internet, the recipient can still parse the data due to the standardized XML syntax.

There are many languages based on XML, including XHTML, MathML, SVG, RSS, and RDF. You can also define your own.

<?xml version="1.0" encoding="UTF-8"?> <message> <warning> Hello World </message>

Now let's look at a corrected version of that same document:

<?xml version="1.0" encoding="UTF-8"?> <message> <warning> Hello World </warning> </message>

A document that contains an undefined tag is invalid. For example, if we never defined the <warning> tag, the document above wouldn't be valid.

Most browsers offer a debugger that can identify poorly-formed XML documents.

Like HTML, XML offers methods (called entities) for referring to some special reserved characters (such as a greater than sign which is used for tags). There are five of these characters that you should know:

Entity Character Description
&lt; < Less than sign
&gt; > Greater than sign
&amp; & Ampersand
&quot; " One double-quotation mark
&apos; ' One apostrophe (or single-quotation mark)

Even though there are only 5 declared entities, more can be added using the document's Document Type Definition. For example, to create a new &warning; entity, you can do this:

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE body [ <!ENTITY warning "Warning: Something bad happened... please refresh and try again."> ]> <body> <message> &warning; </message> </body>

You can also use numeric character references to specify special characters; for example, &#xA9; is the "©" symbol.

XML is usually used for descriptive purposes, but there are ways to display XML data. If you don't define a specific way for the XML to be rendered, the raw XML is displayed in the browser.

One way to style XML output is to specify CSS to apply to the document using the xml-stylesheet processing instruction.

<?xml-stylesheet type="text/css" href="stylesheet.css"?>

There is also another more powerful way to display XML: the Extensible Stylesheet Language Transformations (XSLT) which can be used to transform XML into other languages such as HTML. This makes XML incredibly versatile.

<?xml-stylesheet type="text/xsl" href="transform.xsl"?>

Markup language by the W3C for encoding of data

Why XML language is used?
XML (standard)Extensible Markup LanguageAbbreviationXMLStatusPublished, W3C recommendationYear started1996; 26 years ago (1996)First publishedFebruary 10, 1998; 24 years ago (1998-02-10)Latest version1.1 (2nd ed.)
September 29, 2006; 16 years ago (2006-09-29)OrganizationWorld Wide Web Consortium (W3C)EditorsTim Bray, Jean Paoli, Michael Sperberg-McQueen, Eve Maler, François Yergeau, John W. CowanBase standardsSGMLRelated standardsW3C XML SchemaDomainSerializationWebsitewww.w3.org/xml XML (file format)Filename extension

.xml

Internet media typeapplication/xml, text/xml[1]Uniform Type Identifier (UTI)public.xmlUTI conformationpublic.textMagic number<?xmlDeveloped byWorld Wide Web ConsortiumType of formatMarkup languageExtended fromSGMLExtended toNumerous languages, including XHTML, RSS, Atom, and KMLStandard

  • 1.0, 5th ed. (November 26, 2008 (2008-11-26))
  • 1.1, 2nd ed. (August 16, 2006 (2006-08-16))

Open format?YesFree format?Yes

Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. The World Wide Web Consortium's XML 1.0 Specification[2] of 1998[3] and several other related specifications[4]—all of them free open standards—define XML.[5]

The design goals of XML emphasize simplicity, generality, and usability across the Internet.[6] It is a textual data format with strong support via Unicode for different human languages. Although the design of XML focuses on documents, the language is widely used for the representation of arbitrary data structures[7] such as those used in web services.

Several schema systems exist to aid in the definition of XML-based languages, while programmers have developed many application programming interfaces (APIs) to aid the processing of XML data.

Overview

The main purpose of XML is serialization, i.e. storing, transmitting, and reconstructing arbitrary data. For two disparate systems to exchange information, they need to agree upon a file format. XML standardizes this process. XML is analogous to a lingua franca for representing information.[8]: 1 

As a markup language, XML labels, categorizes, and structurally organizes information.[8]: 11  XML tags represent the data structure and contain metadata. What's within the tags is data, encoded in the way the XML standard specifies.[8]: 11  An additional XML schema (XSD) defines the necessary metadata for interpreting and validating XML. (This is also referred to as the canonical schema.)[8]: 135  An XML document that adheres to basic XML rules is "well-formed"; one that adheres to its schema is "valid."[8]: 135 

IETF RFC 7303 (which supersedes the older RFC 3023), provides rules for the construction of media types for use in XML message. It defines three media types: application/xml (text/xml is an alias), application/xml-external-parsed-entity (text/xml-external-parsed-entity is an alias) and application/xml-dtd. They are used for transmitting raw XML files without exposing their internal semantics. RFC 7303 further recommends that XML-based languages be given media types ending in +xml, for example, image/svg+xml for SVG.

Further guidelines for the use of XML in a networked context appear in RFC 3470, also known as IETF BCP 70, a document covering many aspects of designing and deploying an XML-based language.

Applications

XML has come into common use for the interchange of data over the Internet. Hundreds of document formats using XML syntax have been developed,[9] including RSS, Atom, Office Open XML, OpenDocument, SVG, and XHTML. XML also provides the base language for communication protocols such as SOAP and XMPP. It is the message exchange format for the Asynchronous JavaScript and XML (AJAX) programming technique.

Many industry data standards, such as Health Level 7, OpenTravel Alliance, FpML, MISMO, and National Information Exchange Model are based on XML and the rich features of the XML schema specification. In publishing, Darwin Information Typing Architecture is an XML industry data standard. XML is used extensively to underpin various publishing formats.

Key terminology

The material in this section is based on the XML Specification. This is not an exhaustive list of all the constructs that appear in XML; it provides an introduction to the key constructs most often encountered in day-to-day use.

Character An XML document is a string of characters. Every legal Unicode character (except Null) may appear in an (1.1) XML document (while some are discouraged). Processor and application The processor analyzes the markup and passes structured information to an application. The specification places requirements on what an XML processor must do and not do, but the application is outside its scope. The processor (as the specification calls it) is often referred to colloquially as an XML parser. Markup and content The characters making up an XML document are divided into markup and content, which may be distinguished by the application of simple syntactic rules. Generally, strings that constitute markup either begin with the character < and end with a >, or they begin with the character & and end with a ;. Strings of characters that are not markup are content. However, in a CDATA section, the delimiters <![CDATA[ and ]]> are classified as markup, while the text between them is classified as content. In addition, whitespace before and after the outermost element is classified as markup. Tag A tag is a markup construct that begins with < and ends with >. There are three types of tag:
  • start-tag, such as <section>;
  • end-tag, such as </section>;
  • empty-element tag, such as <line-break />.
Element An element is a logical document component that either begins with a start-tag and ends with a matching end-tag or consists only of an empty-element tag. The characters between the start-tag and end-tag, if any, are the element's content, and may contain markup, including other elements, which are called child elements. An example is <greeting>Hello, world!</greeting>. Another is <line-break />. Attribute An attribute is a markup construct consisting of a name–value pair that exists within a start-tag or empty-element tag. An example is <img src="madonna.jpg" alt="Madonna" />, where the names of the attributes are "src" and "alt", and their values are "madonna.jpg" and "Madonna" respectively. Another example is <step number="3">Connect A to B.</step>, where the name of the attribute is "number" and its value is "3". An XML attribute can only have a single value and each attribute can appear at most once on each element. In the common situation where a list of multiple values is desired, this must be done by encoding the list into a well-formed XML attribute[i] with some format beyond what XML defines itself. Usually this is either a comma or semi-colon delimited list or, if the individual values are known not to contain spaces,[ii] a space-delimited list can be used. <div class="inner greeting-box">Welcome!</div>, where the attribute "class" has both the value "inner greeting-box" and also indicates the two CSS class names "inner" and "greeting-box". XML declaration XML documents may begin with an XML declaration that describes some information about themselves. An example is <?xml version="1.0" encoding="UTF-8"?>.

Characters and escaping

XML documents consist entirely of characters from the Unicode repertoire. Except for a small number of specifically excluded control characters, any character defined by Unicode may appear within the content of an XML document.

XML includes facilities for identifying the encoding of the Unicode characters that make up the document, and for expressing characters that, for one reason or another, cannot be used directly.

Valid characters

Unicode code points in the following ranges are valid in XML 1.0 documents:[10]

  • U+0009 (Horizontal Tab), U+000A (Line Feed), U+000D (Carriage Return): these are the only C0 controls accepted in XML 1.0;
  • U+0020–U+D7FF, U+E000–U+FFFD: this excludes some non-characters in the BMP (all surrogates, U+FFFE and U+FFFF are forbidden);
  • U+10000–U+10FFFF: this includes all code points in supplementary planes, including non-characters.

XML 1.1 extends the set of allowed characters to include all the above, plus the remaining characters in the range U+0001–U+001F.[11] At the same time, however, it restricts the use of C0 and C1 control characters other than U+0009 (Horizontal Tab), U+000A (Line Feed), U+000D (Carriage Return), and U+0085 (Next Line) by requiring them to be written in escaped form (for example U+0001 must be written as &#x01; or its equivalent). In the case of C1 characters, this restriction is a backwards incompatibility; it was introduced to allow common encoding errors to be detected.

The code point U+0000 (Null) is the only character that is not permitted in any XML 1.1 document.

Encoding detection

The Unicode character set can be encoded into bytes for storage or transmission in a variety of different ways, called "encodings". Unicode itself defines encodings that cover the entire repertoire; well-known ones include UTF-8 (which the XML standard recommends using, without a BOM) and UTF-16.[12] There are many other text encodings that predate Unicode, such as ASCII and various ISO/IEC 8859; their character repertoires are in every case subsets of the Unicode character set.

XML allows the use of any of the Unicode-defined encodings and any other encodings whose characters also appear in Unicode. XML also provides a mechanism whereby an XML processor can reliably, without any prior knowledge, determine which encoding is being used.[13] Encodings other than UTF-8 and UTF-16 are not necessarily recognized by every XML parser (and in some cases not even UTF-16, even though the standard mandates it to also be recognized).

Escaping

XML provides escape facilities for including characters that are problematic to include directly. For example:

  • The characters "<" and "&" are key syntax markers and may never appear in content outside a CDATA section. It is allowed, but not recommended, to use "<" in XML entity values.[14]
  • Some character encodings support only a subset of Unicode. For example, it is legal to encode an XML document in ASCII, but ASCII lacks code points for Unicode characters such as "é".
  • It might not be possible to type the character on the author's machine.
  • Some characters have glyphs that cannot be visually distinguished from other characters, such as the non-breaking space (&#xa0;) " " and the space (&#x20;) " ", and the Cyrillic capital letter A (&#x410;) "А" and the Latin capital letter A (&#x41;) "A".

There are five predefined entities:

  • &lt; represents "<";
  • &gt; represents ">";
  • &amp; represents "&";
  • &apos; represents "'";
  • &quot; represents '"'.

All permitted Unicode characters may be represented with a numeric character reference. Consider the Chinese character "中", whose numeric code in Unicode is hexadecimal 4E2D, or decimal 20,013. A user whose keyboard offers no method for entering this character could still insert it in an XML document encoded either as &#20013; or &#x4e2d;. Similarly, the string "I <3 Jörg" could be encoded for inclusion in an XML document as I &lt;3 J&#xF6;rg.

&#0; is not permitted because the null character is one of the control characters excluded from XML, even when using a numeric character reference.[15] An alternative encoding mechanism such as Base64 is needed to represent such characters.

Comments

Comments may appear anywhere in a document outside other markup. Comments cannot appear before the XML declaration. Comments begin with <!-- and end with -->. For compatibility with SGML, the string "--" (double-hyphen) is not allowed inside comments;[16] this means comments cannot be nested. The ampersand has no special significance within comments, so entity and character references are not recognized as such, and there is no way to represent characters outside the character set of the document encoding.

An example of a valid comment: <!--no need to escape <code> & such in comments-->

International use

Why XML language is used?

XML 1.0 (Fifth Edition) and XML 1.1 support the direct use of almost any Unicode character in element names, attributes, comments, character data, and processing instructions (other than the ones that have special symbolic meaning in XML itself, such as the less-than sign, "<"). The following is a well-formed XML document including Chinese, Armenian and Cyrillic characters:

<?xml version="1.0" encoding="UTF-8"?> <俄语 լեզու="ռուսերեն">данные</俄语>

Syntactical correctness and error-handling

The XML specification defines an XML document as a well-formed text, meaning that it satisfies a list of syntax rules provided in the specification. Some key points in the fairly lengthy list include:

  • The document contains only properly encoded legal Unicode characters.
  • None of the special syntax characters such as < and & appear except when performing their markup-delineation roles.
  • The start-tag, end-tag, and empty-element tag that delimit elements are correctly nested, with none missing and none overlapping.
  • Tag names are case-sensitive; the start-tag and end-tag must match exactly.
  • Tag names cannot contain any of the characters !"#$%&'()*+,/;<=>?@[\]^`{|}~, nor a space character, and cannot begin with "-", ".", or a numeric digit.
  • A single root element contains all the other elements.

The definition of an XML document excludes texts that contain violations of well-formedness rules; they are simply not XML. An XML processor that encounters such a violation is required to report such errors and to cease normal processing. This policy, occasionally referred to as "draconian error handling," stands in notable contrast to the behavior of programs that process HTML, which are designed to produce a reasonable result even in the presence of severe markup errors.[17] XML's policy in this area has been criticized as a violation of Postel's law ("Be conservative in what you send; be liberal in what you accept").[18]

The XML specification defines a valid XML document as a well-formed XML document which also conforms to the rules of a Document Type Definition (DTD).[19][20]

Schemas and validation

In addition to being well-formed, an XML document may be valid. This means that it contains a reference to a Document Type Definition (DTD), and that its elements and attributes are declared in that DTD and follow the grammatical rules for them that the DTD specifies.

XML processors are classified as validating or non-validating depending on whether or not they check XML documents for validity. A processor that discovers a validity error must be able to report it, but may continue normal processing.

A DTD is an example of a schema or grammar. Since the initial publication of XML 1.0, there has been substantial work in the area of schema languages for XML. Such schema languages typically constrain the set of elements that may be used in a document, which attributes may be applied to them, the order in which they may appear, and the allowable parent/child relationships.

Document type definition

The oldest schema language for XML is the document type definition (DTD), inherited from SGML.

DTDs have the following benefits:

  • DTD support is ubiquitous due to its inclusion in the XML 1.0 standard.
  • DTDs are terse compared to element-based schema languages and consequently present more information in a single screen.
  • DTDs allow the declaration of standard public entity sets for publishing characters.
  • DTDs define a document type rather than the types used by a namespace, thus grouping all constraints for a document in a single collection.

DTDs have the following limitations:

  • They have no explicit support for newer features of XML, most importantly namespaces.
  • They lack expressiveness. XML DTDs are simpler than SGML DTDs and there are certain structures that cannot be expressed with regular grammars. DTDs only support rudimentary datatypes.
  • They lack readability. DTD designers typically make heavy use of parameter entities (which behave essentially as textual macros), which make it easier to define complex grammars, but at the expense of clarity.
  • They use a syntax based on regular expression syntax, inherited from SGML, to describe the schema. Typical XML APIs such as SAX do not attempt to offer applications a structured representation of the syntax, so it is less accessible to programmers than an element-based syntax may be.

Two peculiar features that distinguish DTDs from other schema types are the syntactic support for embedding a DTD within XML documents and for defining entities, which are arbitrary fragments of text or markup that the XML processor inserts in the DTD itself and in the XML document wherever they are referenced, like character escapes.

DTD technology is still used in many applications because of its ubiquity.

Schema

A newer schema language, described by the W3C as the successor of DTDs, is XML Schema, often referred to by the initialism for XML Schema instances, XSD (XML Schema Definition). XSDs are far more powerful than DTDs in describing XML languages. They use a rich datatyping system and allow for more detailed constraints on an XML document's logical structure. XSDs also use an XML-based format, which makes it possible to use ordinary XML tools to help process them.

xs:schema element that defines a schema:

<?xml version="1.0" encoding="UTF-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"></xs:schema>

RELAX NG

RELAX NG (Regular Language for XML Next Generation) was initially specified by OASIS and is now a standard (Part 2: Regular-grammar-based validation of ISO/IEC 19757 – DSDL). RELAX NG schemas may be written in either an XML based syntax or a more compact non-XML syntax; the two syntaxes are isomorphic and James Clark's conversion tool—Trang—can convert between them without loss of information. RELAX NG has a simpler definition and validation framework than XML Schema, making it easier to use and implement. It also has the ability to use datatype framework plug-ins; a RELAX NG schema author, for example, can require values in an XML document to conform to definitions in XML Schema Datatypes.

Schematron

Schematron is a language for making assertions about the presence or absence of patterns in an XML document. It typically uses XPath expressions. Schematron is now a standard (Part 3: Rule-based validation of ISO/IEC 19757 – DSDL).

DSDL and other schema languages

DSDL (Document Schema Definition Languages) is a multi-part ISO/IEC standard (ISO/IEC 19757) that brings together a comprehensive set of small schema languages, each targeted at specific problems. DSDL includes RELAX NG full and compact syntax, Schematron assertion language, and languages for defining datatypes, character repertoire constraints, renaming and entity expansion, and namespace-based routing of document fragments to different validators. DSDL schema languages do not have the vendor support of XML Schemas yet, and are to some extent a grassroots reaction of industrial publishers to the lack of utility of XML Schemas for publishing.

Some schema languages not only describe the structure of a particular XML format but also offer limited facilities to influence processing of individual XML files that conform to this format. DTDs and XSDs both have this ability; they can for instance provide the infoset augmentation facility and attribute defaults. RELAX NG and Schematron intentionally do not provide these.

A cluster of specifications closely related to XML have been developed, starting soon after the initial publication of XML 1.0. It is frequently the case that the term "XML" is used to refer to XML together with one or more of these other technologies that have come to be seen as part of the XML core.

  • XML namespaces enable the same document to contain XML elements and attributes taken from different vocabularies, without any naming collisions occurring. Although XML Namespaces are not part of the XML specification itself, virtually all XML software also supports XML Namespaces.
  • XML Base defines the xml:base attribute, which may be used to set the base for resolution of relative URI references within the scope of a single XML element.
  • XML Information Set or XML Infoset is an abstract data model for XML documents in terms of information items. The infoset is commonly used in the specifications of XML languages, for convenience in describing constraints on the XML constructs those languages allow.
  • XSL (Extensible Stylesheet Language) is a family of languages used to transform and render XML documents, split into three parts:
  • XSLT (XSL Transformations), an XML language for transforming XML documents into other XML documents or other formats such as HTML, plain text, or XSL-FO. XSLT is very tightly coupled with XPath, which it uses to address components of the input XML document, mainly elements and attributes.
  • XSL-FO (XSL Formatting Objects), an XML language for rendering XML documents, often used to generate PDFs.
  • XPath (XML Path Language), a non-XML language for addressing the components (elements, attributes, and so on) of an XML document. XPath is widely used in other core-XML specifications and in programming libraries for accessing XML-encoded data.
  • XQuery (XML Query) is an XML query language strongly rooted in XPath and XML Schema. It provides methods to access, manipulate and return XML, and is mainly conceived as a query language for XML databases.
  • XML Signature defines syntax and processing rules for creating digital signatures on XML content.
  • XML Encryption defines syntax and processing rules for encrypting XML content.
  • XML model (Part 11: Schema Association of ISO/IEC 19757 – DSDL) defines a means of associating any xml document with any of the schema types mentioned above.

Some other specifications conceived as part of the "XML Core" have failed to find wide adoption, including XInclude, XLink, and XPointer.

Programming interfaces

The design goals of XML include, "It shall be easy to write programs which process XML documents."[6] Despite this, the XML specification contains almost no information about how programmers might go about doing such processing. The XML Infoset specification provides a vocabulary to refer to the constructs within an XML document, but does not provide any guidance on how to access this information. A variety of APIs for accessing XML have been developed and used, and some have been standardized.

Existing APIs for XML processing tend to fall into these categories:

  • Stream-oriented APIs accessible from a programming language, for example SAX and StAX.
  • Tree-traversal APIs accessible from a programming language, for example DOM.
  • XML data binding, which provides an automated translation between an XML document and programming-language objects.
  • Declarative transformation languages such as XSLT and XQuery.
  • Syntax extensions to general-purpose programming languages, for example LINQ and Scala.

Stream-oriented facilities require less memory and, for certain tasks based on a linear traversal of an XML document, are faster and simpler than other alternatives. Tree-traversal and data-binding APIs typically require the use of much more memory, but are often found more convenient for use by programmers; some include declarative retrieval of document components via the use of XPath expressions.

XSLT is designed for declarative description of XML document transformations, and has been widely implemented both in server-side packages and Web browsers. XQuery overlaps XSLT in its functionality, but is designed more for searching of large XML databases.

Simple API for XML

Simple API for XML (SAX) is a lexical, event-driven API in which a document is read serially and its contents are reported as callbacks to various methods on a handler object of the user's design. SAX is fast and efficient to implement, but difficult to use for extracting information at random from the XML, since it tends to burden the application author with keeping track of what part of the document is being processed. It is better suited to situations in which certain types of information are always handled the same way, no matter where they occur in the document.

Pull parsing

Pull parsing treats the document as a series of items read in sequence using the iterator design pattern. This allows for writing of recursive descent parsers in which the structure of the code performing the parsing mirrors the structure of the XML being parsed, and intermediate parsed results can be used and accessed as local variables within the functions performing the parsing, or passed down (as function parameters) into lower-level functions, or returned (as function return values) to higher-level functions.[21] Examples of pull parsers include Data::Edit::Xml in Perl, StAX in the Java programming language, XMLPullParser in Smalltalk, XMLReader in PHP, ElementTree.iterparse in Python, System.Xml.XmlReader in the .NET Framework, and the DOM traversal API (NodeIterator and TreeWalker).

A pull parser creates an iterator that sequentially visits the various elements, attributes, and data in an XML document. Code that uses this iterator can test the current item (to tell, for example, whether it is a start-tag or end-tag, or text), and inspect its attributes (local name, namespace, values of XML attributes, value of text, etc.), and can also move the iterator to the next item. The code can thus extract information from the document as it traverses it. The recursive-descent approach tends to lend itself to keeping data as typed local variables in the code doing the parsing, while SAX, for instance, typically requires a parser to manually maintain intermediate data within a stack of elements that are parent elements of the element being parsed. Pull-parsing code can be more straightforward to understand and maintain than SAX parsing code.

Document Object Model

Document Object Model (DOM) is an API that allows for navigation of the entire document as if it were a tree of node objects representing the document's contents. A DOM document can be created by a parser, or can be generated manually by users (with limitations). Data types in DOM nodes are abstract; implementations provide their own programming language-specific bindings. DOM implementations tend to be memory intensive, as they generally require the entire document to be loaded into memory and constructed as a tree of objects before access is allowed.

Data binding

XML data binding is the binding of XML documents to a hierarchy of custom and strongly typed objects, in contrast to the generic objects created by a DOM parser. This approach simplifies code development, and in many cases allows problems to be identified at compile time rather than run-time. It is suitable for applications where the document structure is known and fixed at the time the application is written. Example data binding systems include the Java Architecture for XML Binding (JAXB), XML Serialization in .NET Framework.[22] and XML serialization in gSOAP.

XML as data type

XML has appeared as a first-class data type in other languages. The ECMAScript for XML (E4X) extension to the ECMAScript/JavaScript language explicitly defines two specific objects (XML and XMLList) for JavaScript, which support XML document nodes and XML node lists as distinct objects and use a dot-notation specifying parent-child relationships.[23] E4X is supported by the Mozilla 2.5+ browsers (though now deprecated) and Adobe Actionscript, but has not been adopted more universally. Similar notations are used in Microsoft's LINQ implementation for Microsoft .NET 3.5 and above, and in Scala (which uses the Java VM). The open-source xmlsh application, which provides a Linux-like shell with special features for XML manipulation, similarly treats XML as a data type, using the <[ ]> notation.[24] The Resource Description Framework defines a data type rdf:XMLLiteral to hold wrapped, canonical XML.[25] Facebook has produced extensions to the PHP and JavaScript languages that add XML to the core syntax in a similar fashion to E4X, namely XHP and JSX respectively.

History

XML is an application profile of SGML (ISO 8879).[26]

The versatility of SGML for dynamic information display was understood by early digital media publishers in the late 1980s prior to the rise of the Internet.[27][28] By the mid-1990s some practitioners of SGML had gained experience with the then-new World Wide Web, and believed that SGML offered solutions to some of the problems the Web was likely to face as it grew. Dan Connolly added SGML to the list of W3C's activities when he joined the staff in 1995; work began in mid-1996 when Sun Microsystems engineer Jon Bosak developed a charter and recruited collaborators. Bosak was well connected in the small community of people who had experience both in SGML and the Web.[29]

XML was compiled by a working group of eleven members,[30] supported by a (roughly) 150-member Interest Group. Technical debate took place on the Interest Group mailing list and issues were resolved by consensus or, when that failed, majority vote of the Working Group. A record of design decisions and their rationales was compiled by Michael Sperberg-McQueen on December 4, 1997.[31] James Clark served as Technical Lead of the Working Group, notably contributing the empty-element <empty /> syntax and the name "XML". Other names that had been put forward for consideration included "MAGMA" (Minimal Architecture for Generalized Markup Applications), "SLIM" (Structured Language for Internet Markup) and "MGML" (Minimal Generalized Markup Language). The co-editors of the specification were originally Tim Bray and Michael Sperberg-McQueen. Halfway through the project Bray accepted a consulting engagement with Netscape, provoking vociferous protests from Microsoft. Bray was temporarily asked to resign the editorship. This led to intense dispute in the Working Group, eventually solved by the appointment of Microsoft's Jean Paoli as a third co-editor.

The XML Working Group never met face-to-face; the design was accomplished using a combination of email and weekly teleconferences. The major design decisions were reached in a short burst of intense work between August and November 1996,[32] when the first Working Draft of an XML specification was published.[33] Further design work continued through 1997, and XML 1.0 became a W3C Recommendation on February 10, 1998.

Sources

XML is a profile of an ISO standard SGML, and most of XML comes from SGML unchanged. From SGML comes the separation of logical and physical structures (elements and entities), the availability of grammar-based validation (DTDs), the separation of data and metadata (elements and attributes), mixed content, the separation of processing from representation (processing instructions), and the default angle-bracket syntax. The SGML declaration was removed; thus XML has a fixed delimiter set and adopts Unicode as the document character set.

Other sources of technology for XML were the TEI (Text Encoding Initiative), which defined a profile of SGML for use as a "transfer syntax"; and HTML, in which elements were synchronous with their resource, document character sets were separate from resource encoding, the xml:lang attribute was invented, and (like HTTP) metadata accompanied the resource rather than being needed at the declaration of a link. The ERCS(Extended Reference Concrete Syntax) project of the SPREAD (Standardization Project Regarding East Asian Documents) project of the ISO-related China/Japan/Korea Document Processing expert group was the basis of XML 1.0's naming rules; SPREAD also introduced hexadecimal numeric character references and the concept of references to make available all Unicode characters. To support ERCS, XML and HTML better, the SGML standard IS 8879 was revised in 1996 and 1998 with WebSGML Adaptations. The XML header followed that of ISO HyTime.

Ideas that developed during discussion that are novel in XML included the algorithm for encoding detection and the encoding header, the processing instruction target, the xml:space attribute, and the new close delimiter for empty-element tags. The notion of well-formedness as opposed to validity (which enables parsing without a schema) was first formalized in XML, although it had been implemented successfully in the Electronic Book Technology "Dynatext" software;[34] the software from the University of Waterloo New Oxford English Dictionary Project; the RISP LISP SGML text processor at Uniscope, Tokyo; the US Army Missile Command IADS hypertext system; Mentor Graphics Context; Interleaf and Xerox Publishing System.

Versions

1.0 and 1.1

The first (XML 1.0) was initially defined in 1998. It has undergone minor revisions since then, without being given a new version number, and is currently in its fifth edition, as published on November 26, 2008. It is widely implemented and still recommended for general use.

The second (XML 1.1) was initially published on February 4, 2004, the same day as XML 1.0 Third Edition,[35] and is currently in its second edition, as published on August 16, 2006. It contains features (some contentious) that are intended to make XML easier to use in certain cases.[36] The main changes are to enable the use of line-ending characters used on EBCDIC platforms, and the use of scripts and characters absent from Unicode 3.2. XML 1.1 is not very widely implemented and is recommended for use only by those who need its particular features.[37]

Prior to its fifth edition release, XML 1.0 differed from XML 1.1 in having stricter requirements for characters available for use in element and attribute names and unique identifiers: in the first four editions of XML 1.0 the characters were exclusively enumerated using a specific version of the Unicode standard (Unicode 2.0 to Unicode 3.2.) The fifth edition substitutes the mechanism of XML 1.1, which is more future-proof but reduces redundancy. The approach taken in the fifth edition of XML 1.0 and in all editions of XML 1.1 is that only certain characters are forbidden in names, and everything else is allowed to accommodate suitable name characters in future Unicode versions. In the fifth edition, XML names may contain characters in the Balinese, Cham, or Phoenician scripts among many others added to Unicode since Unicode 3.2.[36]

Almost any Unicode code point can be used in the character data and attribute values of an XML 1.0 or 1.1 document, even if the character corresponding to the code point is not defined in the current version of Unicode. In character data and attribute values, XML 1.1 allows the use of more control characters than XML 1.0, but, for "robustness", most of the control characters introduced in XML 1.1 must be expressed as numeric character references (and #x7F through #x9F, which had been allowed in XML 1.0, are in XML 1.1 even required to be expressed as numeric character references[38]). Among the supported control characters in XML 1.1 are two line break codes that must be treated as whitespace characters, which are the only control codes that can be written directly.

2.0

There has been discussion of an XML 2.0, although no organization has announced plans for work on such a project. XML-SW (SW for skunkworks), which one of the original developers of XML has written,[39] contains some proposals for what an XML 2.0 might look like, including elimination of DTDs from syntax, as well as integration of XML namespaces, XML Base and XML Information Set into the base standard.

Binary XML

The World Wide Web Consortium also has an XML Binary Characterization Working Group doing preliminary research into use cases and properties for a binary encoding of XML Information Set. The working group is not chartered to produce any official standards. Since XML is by definition text-based, ITU-T and ISO are using the name Fast Infoset for their own binary format (ITU-T Rec. X.891 and ISO/IEC 24824-1) to avoid confusion.

Criticism

XML and its extensions have regularly been criticized for verbosity, complexity and redundancy.[40]

Mapping the basic tree model of XML to type systems of programming languages or databases can be difficult, especially when XML is used for exchanging highly structured data between applications, which was not its primary design goal. However, XML data binding systems allow applications to access XML data directly from objects representing a data structure of the data in the programming language used, which ensures type safety, rather than using the DOM or SAX to retrieve data from a direct representation of the XML itself. This is accomplished by automatically creating a mapping between elements of the XML schema XSD of the document and members of a class to be represented in memory.

Other criticisms attempt to refute the claim that XML is a self-describing language[41] (though the XML specification itself makes no such claim).

JSON, YAML, and S-Expressions are frequently proposed as simpler alternatives (see Comparison of data serialization formats)[42] that focus on representing highly structured data rather than documents, which may contain both highly structured and relatively unstructured content. However, W3C standardized XML schema specifications offer a broader range of structured XSD data types compared to simpler serialization formats and offer modularity and reuse through XML namespaces.

See also

  • List of XML markup languages
  • List of XML schemas
  • Extensible programming
  • Comparison of data-serialization formats
  • Binary XML
  • EBML
  • WBXML
  • XML Protocol

Notes

  1. ^ i.e., embedded quote characters would be a problem
  2. ^ A common example of this is CSS class or identifier names.

References

  1. ^ "XML Media Types, RFC 7303". Internet Engineering Task Force. July 2014.
  2. ^ "XML 1.0 Specification". World Wide Web Consortium. Retrieved 22 August 2010.
  3. ^ "Extensible Markup Language (XML) 1.0". www.w3.org.
  4. ^ "XML and Semantic Web W3C Standards Timeline" (PDF). Dblab.ntua.gr. Archived from the original (PDF) on 24 April 2013. Retrieved 14 August 2016.
  5. ^ "W3C DOCUMENT LICENSE". W3.org. Retrieved 24 July 2020.
  6. ^ a b "XML 1.0 Origin and Goals". W3.org. Retrieved 14 August 2016.
  7. ^ Fennell, Philip (June 2013). "Extremes of XML". XML London 2013: 80–86. doi:10.14337/XMLLondon13.Fennell01. ISBN 978-0-9926471-0-0.
  8. ^ a b c d e Dykes, Lucinda (2005). XML for Dummies (4th ed.). Hoboken, N.J.: Wiley. ISBN 978-0-7645-8845-7.
  9. ^ "XML Applications and Initiatives". Xml.coverages.org. Retrieved 16 November 2017.
  10. ^ "Extensible Markup Language (XML) 1.0 (Fifth Edition)". World Wide Web Consortium. 2008-11-26. Retrieved 23 November 2012.
  11. ^ "Extensible Markup Language (XML) 1.1 (Second Edition)". World Wide Web Consortium. Retrieved 22 August 2010.
  12. ^ "Characters vs. Bytes". Tbray.org. Retrieved 16 November 2017.
  13. ^ "Autodetection of Character Encodings". W3.org. Retrieved 16 November 2017.
  14. ^ "Extensible Markup Language (XML) 1.0 (Fifth Edition)". W3.org. Retrieved 16 November 2017.
  15. ^ "W3C I18N FAQ: HTML, XHTML, XML and Control Codes". W3.org. Retrieved 16 November 2017.
  16. ^ "Extensible Markup Language (XML)". W3.org. Retrieved 16 November 2017. Section "Comments"
  17. ^ Pilgrim, Mark (2004). "The history of draconian error handling in XML". Archived from the original on 2011-07-26. Retrieved 18 July 2013.
  18. ^ "There are No Exceptions to Postel's Law [dive into mark]". DiveIntoMark.org. Archived from the original on 2011-05-14. Retrieved 22 April 2013.
  19. ^ "XML Notepad". Xmlnotepad/codeplex.com. Archived from the original on 15 November 2017. Retrieved 16 November 2017.
  20. ^ "XML Notepad 2007". Microsoft.com. Retrieved 16 November 2017.
  21. ^ DuCharme, Bob. "Push, Pull, Next!". Xml.com. Retrieved 16 November 2017.
  22. ^ "XML Serialization in the .NET Framework". Msdn.microsoft.com. Retrieved 31 July 2009.
  23. ^ "Processing XML with E4X". Mozilla Developer Center. Mozilla Foundation. Archived from the original on 2011-05-01. Retrieved 2010-07-27.
  24. ^ "XML Shell: Core Syntax". Xmlsh.org. 2010-05-13. Retrieved 22 August 2010.
  25. ^ "Resource Description Framework (RDF): Concepts and Abstract Syntax". W3.org. Retrieved 22 August 2010.
  26. ^ "ISO/IEC 19757-3". ISO/IEC. 1 June 2006: vi. {{cite journal}}: Cite journal requires |journal= (help)
  27. ^ Bray, Tim (February 2005). "A conversation with Tim Bray: Searching for ways to tame the world's vast stores of information". Association for Computing Machinery's "Queue site". Retrieved 16 April 2006.
  28. ^ Ambron, Sueann & Hooper, Kristina, eds. (1988). "Publishers, multimedia, and interactivity". Interactive multimedia. Cobb Group. ISBN 1-55615-124-1.
  29. ^ Eliot Kimber (2006). "XML is 10". Drmacros-xml-rants.blogspot.com. Retrieved 16 November 2017.
  30. ^ The working group was originally called the "Editorial Review Board." The original members and seven who were added before the first edition was complete, are listed at the end of the first edition of the XML Recommendation, at http://www.w3.org/TR/1998/REC-xml-19980210.
  31. ^ "Reports From the W3C SGML ERB to the SGML WG And from the W3C XML ERB to the XML SIG". W3.org. Retrieved 31 July 2009.
  32. ^ "Oracle Technology Network for Java Developers - Oracle Technology Network - Oracle". Java.sun.com. Retrieved 16 November 2017.
  33. ^ "Extensible Markup Language (XML)". W3.org. 1996-11-14. Retrieved 31 July 2009.
  34. ^ Jon Bosak; Sun Microsystems (2006-12-07). "Closing Keynote, XML 2006". 2006.xmlconference.org. Archived from the original on 2007-07-11. Retrieved 31 July 2009.
  35. ^ "Extensible Markup Language (XML) 1.0 (Third Edition)". W3.org. Retrieved 22 August 2010.
  36. ^ a b "Extensible Markup Language (XML) 1.1 (Second Edition) , Rationale and list of changes for XML 1.1". W3.org. Retrieved 20 January 2012.
  37. ^ Harold, Elliotte Rusty (2004). Effective XML. Addison-Wesley. pp. 10–19. ISBN 0-321-15040-6.
  38. ^ "Extensible Markup Language (XML) 1.1 (Second Edition)". W3.org. Retrieved 22 August 2010.
  39. ^ Bray, Tim (10 February 2002). "Extensible Markup Language, SW (XML-SW)".
  40. ^ "XML: The Angle Bracket Tax". Codinghorror.com. 11 May 2008. Retrieved 16 November 2017.
  41. ^ "The Myth of Self-Describing XML" (PDF). Workflow.HealthBase.info. September 2003. Retrieved 16 November 2017.
  42. ^ "What usable alternatives to XML syntax do you know?". StackOverflow.com. Retrieved 16 November 2017.

Further reading

  • Annex A of ISO 8879:1986 (SGML)
  • Lawrence A. Cunningham (2005). "Language, Deals and Standards: The Future of XML Contracts". Washington University Law Review. SSRN 900616.
  • Bosak, Jon; Bray, Tim (May 1999). "XML and the Second-Generation Web". Scientific American. 280 (5): 89. Bibcode:1999SciAm.280e..89B. doi:10.1038/scientificamerican0599-89. Archived from the original on 1 October 2009.
  • Kelly, Sean (February 6, 2006). "Making Mistakes with XML". Developer.com. Retrieved 26 October 2010.
  • St. Laurent, Simon (February 12, 2003). "Five Years Later, XML." O'Reilly XML Blog. O'Reilly Media. Retrieved 26 October 2010.
  • "W3C XML is Ten!". World Wide Web Consortium. 12 February 2008. Retrieved 26 October 2010.
  • "Introduction to XML" (PDF). Course Slides. Pierre Geneves. October 2012. Archived from the original on 2015-10-16.{{cite web}}: CS1 maint: bot: original URL status unknown (link)

Why XML language is used?

Why XML language is used?

  • W3C XML homepage
  • XML 1.0 Specification
  • Retrospective on Extended Reference Concrete Syntax Archived 2019-11-18 at the Wayback Machine by Rick Jelliffe
  • XML, Java and the Future of the Web (1997) by Jon Bosak
  • http://validator.w3.org/ The Official [W3C] Markup Validation Service
  • The XML FAQ originally for the W3C's XML SIG by Peter Flynn

Retrieved from "https://en.wikipedia.org/w/index.php?title=XML&oldid=1118418091"


Page 2

Version 2 of the Hypertext Transfer Protocol used by the World Wide Web

HTTP/2International standardRFC 7540Developed byIETFIntroducedMay 14, 2015; 7 years ago (2015-05-14)Websitehttps://http2.github.io/

HTTP/2 (originally named HTTP/2.0) is a major revision of the HTTP network protocol used by the World Wide Web. It was derived from the earlier experimental SPDY protocol, originally developed by Google.[1][2] HTTP/2 was developed by the HTTP Working Group (also called httpbis, where "bis" means "twice") of the Internet Engineering Task Force (IETF).[3][4][5] HTTP/2 is the first new version of HTTP since HTTP/1.1, which was standardized in RFC 2068 in 1997. The Working Group presented HTTP/2 to the Internet Engineering Steering Group (IESG) for consideration as a Proposed Standard in December 2014,[6][7] and IESG approved it to publish as Proposed Standard on February 17, 2015 (and was updated in February 2020 in regard to TLS 1.3).[8][9] The HTTP/2 specification was published as RFC 7540 on May 14, 2015.[10]

The standardization effort was supported by Chrome, Opera, Firefox,[11] Internet Explorer 11, Safari, Amazon Silk, and Edge browsers.[12] Most major browsers had added HTTP/2 support by the end of 2015.[13] About 97% of web browsers used have the capability.[14] As of October 2021[update], 47% (after topping out at just over 50%) of the top 10 million websites supported HTTP/2.[15]

Its successor is HTTP/3, a major revision that builds on the concepts established by HTTP/2.[2][16][17][18]

Goals

The working group charter mentions several goals and issues of concern:[4]

  • Create a negotiation mechanism that allows clients and servers to elect to use HTTP/1.1, 2.0, or potentially other non-HTTP protocols.
  • Maintain high-level compatibility with HTTP/1.1 (for example with methods, status codes, URIs, and most header fields).
  • Decrease latency to improve page load speed in web browsers by considering:
    • data compression of HTTP headers
    • HTTP/2 Server Push
    • prioritization of requests
    • multiplexing multiple requests over a single TCP connection (fixing the head-of-line blocking problem in HTTP 1.x)
  • Support common existing use cases of HTTP, such as desktop web browsers, mobile web browsers, web APIs, web servers at various scales, proxy servers, reverse proxy servers, firewalls, and content delivery networks.

Differences from HTTP/1.1

The proposed changes do not require any changes to how existing web applications work, but new applications can take advantage of new features for increased speed.[19] HTTP/2 leaves all of HTTP/1.1's high-level semantics, such as methods, status codes, header fields, and URIs, the same. What is new is how the data is framed and transported between the client and the server.[19]

Websites that are efficient minimize the number of requests required to render an entire page by minifying (reducing the amount of code and packing smaller pieces of code into bundles, without reducing its ability to function) resources such as images and scripts. However, minification is not necessarily convenient nor efficient and may still require separate HTTP connections to get the page and the minified resources. HTTP/2 allows the server to "push" content, that is, to respond with data for more queries than the client requested. This allows the server to supply data it knows a web browser will need to render a web page, without waiting for the browser to examine the first response, and without the overhead of an additional request cycle.[20]

Additional performance improvements in the first draft of HTTP/2 (which was a copy of SPDY) come from multiplexing of requests and responses to avoid some of the head-of-line blocking problem in HTTP 1 (even when HTTP pipelining is used), header compression, and prioritization of requests.[21] However, as HTTP/2 runs on top of a single TCP connection there is still potential for head-of-line blocking to occur if TCP packets are lost or delayed in transmission.[22] HTTP/2 no longer supports HTTP/1.1's chunked transfer encoding mechanism, as it provides its own, more efficient, mechanisms for data streaming.[23]

History

Genesis in and later differences from SPDY

SPDY (pronounced like "speedy") was a previous HTTP-replacement protocol developed by a research project spearheaded by Google.[24] Primarily focused on reducing latency, SPDY uses the same TCP pipe but different protocols to accomplish this reduction. The basic changes made to HTTP/1.1 to create SPDY included: "true request pipelining without FIFO restrictions, message framing mechanism to simplify client and server development, mandatory compression (including headers), priority scheduling, and even bi-directional communication".[25]

The HTTP Working Group considered Google's SPDY protocol, Microsoft's HTTP Speed+Mobility proposal (SPDY based),[24] and Network-Friendly HTTP Upgrade.[26] In July 2012, Facebook provided feedback on each of the proposals and recommended HTTP/2 be based on SPDY.[27] The initial draft of HTTP/2 was published in November 2012 and was based on a straight copy of SPDY.[28]

The biggest difference between HTTP/1.1 and SPDY was that each user action in SPDY is given a "stream ID", meaning there is a single TCP channel connecting the user to the server. SPDY split requests into either control or data, using a "simple to parse binary protocol with two types of frames".[25][29] SPDY showed evident improvement over HTTP, with a new page load speedup ranging from 11% to 47%.[30]

The development of HTTP/2 used SPDY as a jumping-off point. Among the many detailed differences between the protocols, the most notable is that HTTP/2 uses a fixed Huffman code-based header compression algorithm, instead of SPDY's dynamic stream-based compression. This helps to reduce the potential for compression oracle attacks on the protocol, such as the CRIME attack.[29]

On February 9, 2015, Google announced plans to remove support for SPDY in Chrome in favor of support for HTTP/2.[31] That took effect, starting with Chrome 51.[32][33]

Development milestones

Date Milestone[4]
December 20, 2007[34][35] First HTTP/1.1 Revision Internet Draft
January 23, 2008[36] First HTTP Security Properties Internet Draft
Early 2012[37] Call for Proposals for HTTP 2.0
October 14 – November 25, 2012[38][39] Working Group Last Call for HTTP/1.1 Revision
November 28, 2012[40][41] First WG draft of HTTP 2.0, based upon draft-mbelshe-httpbis-spdy-00
Held/Eliminated Working Group Last Call for HTTP Security Properties
September 2013[42][43] Submit HTTP/1.1 Revision to IESG for consideration as a Proposed Standard
February 12, 2014[44] IESG approved HTTP/1.1 Revision to publish as a Proposed Standard
June 6, 2014[34][45] Publish HTTP/1.1 Revision as RFC 7230, 7231, 7232, 7233, 7234, 7235
August 1, 2014 – September 1, 2014[7][46] Working Group Last call for HTTP/2
December 16, 2014[6] Submit HTTP/2 to IESG for consideration as a Proposed Standard
December 31, 2014 – January 14, 2015[47] IETF Last Call for HTTP/2
January 22, 2015[48] IESG telechat to review HTTP/2 as Proposed Standard
February 17, 2015[8] IESG approved HTTP/2 to publish as Proposed Standard
May 14, 2015[49] Publish HTTP/2 as RFC 7540
February 2020 RFC 8740: HTTP/2 with TLS 1.3

Encryption

HTTP/2 is defined both for HTTP URIs (i.e. without TLS encryption, a configuration which is abbreviated in h2c) and for HTTPS URIs (over TLS using ALPN extension[50] where TLS 1.2 or newer is required, a configuration which is abbreviated in h2).

Although the standard itself does not require usage of encryption,[51] all major client implementations (Firefox,[52] Chrome, Safari, Opera, IE, Edge) have stated that they will only support HTTP/2 over TLS, which makes encryption de facto mandatory.[53]

Criticisms

Development process

The FreeBSD and Varnish developer Poul-Henning Kamp asserts that the standard was prepared on an unrealistically short schedule, ruling out any basis for the new HTTP/2 other than the SPDY protocol and resulting in other missed opportunities for improvement. Kamp criticizes the protocol itself for being inconsistent and having needless, overwhelming complexity. He also states that the protocol violates the protocol layering principle, for example by duplicating flow control that belongs in the transport layer (TCP). He also suggested that the new protocol should have removed HTTP Cookies, introducing a breaking change.[54]

Encryption

Initially, some members[who?] of the Working Group tried to introduce an encryption requirement in the protocol. This faced criticism.

Critics stated that encryption has non-negligible computing costs and that many HTTP applications actually have no need for encryption and their providers have no desire to spend additional resources on it. Encryption proponents have stated that this encryption overhead is negligible in practice.[55] Poul-Henning Kamp has criticized the IETF for hastily standardizing Google's SPDY prototype as HTTP/2 due to political considerations.[54][56][57] The criticism of the agenda of mandatory encryption within the existing certificate framework is not new, nor is it unique to members of the open-source community – a Cisco employee stated in 2013 that the present certificate model is not compatible with small devices like routers, because the present model requires not only annual enrollment and remission of non-trivial fees for each certificate, but must be continually repeated on an annual basis.[58] In the end the Working Group did not reach consensus over the mandatory encryption,[51] although most client implementations require it, which makes encryption a de facto requirement.

The HTTP/2 protocol also faced criticism for not supporting opportunistic encryption, a measure against passive monitoring similar to the STARTTLS mechanism that has long been available in other Internet protocols like SMTP. Critics have stated that the HTTP/2 proposal goes in violation of IETF's own RFC 7258 "Pervasive Monitoring Is an Attack", which also has a status of Best Current Practice 188.[59] RFC7258/BCP188 mandates that passive monitoring be considered as an attack, and protocols designed by IETF should take steps to protect against passive monitoring (for example, through the use of opportunistic encryption). A number of specifications for opportunistic encryption of HTTP/2 have been provided,[60][61][62] of which draft-nottingham-http2-encryption was adopted as an official work item of the working group, leading to the publication of RFC 8164 in May 2017.

TCP head-of-line blocking

Although the design of HTTP/2 effectively addresses the HTTP-transaction-level head-of-line blocking problem by allowing multiple concurrent HTTP transactions, all those transactions are multiplexed over a single TCP connection, meaning that any packet-level head-of-line blocking of the TCP stream simultaneously blocks all transactions being accessed via that connection. This head-of-line blocking in HTTP/2 is now widely regarded as a design flaw, and much of the effort behind QUIC and HTTP/3 has been devoted to reduce head-of-line blocking issues.[63][64]

Server-side support

Server software

  • Apache 2.4.12 supports HTTP/2 via the module mod_h2,[65] although appropriate patches must be applied to the source code of the server in order for it to support that module. As of Apache 2.4.17 all patches are included in the main Apache source tree, although the module itself was renamed mod_http2.[66] Old versions of SPDY were supported via the module mod_spdy,[67] however the development of the mod_spdy module has stopped.[68]
  • Apache Tomcat supports HTTP/2 with version 8.5 and newer with a configuration change.[69]
  • Apache Traffic Server supports HTTP/2.[70]
  • Caddy supports HTTP/2.[71]
  • Charles Proxy supports HTTP/2 since version Charles 4.[72]
  • Citrix NetScaler 11.x supports HTTP/2.[73]
  • Sucuri Supports HTTP/2.[74]
  • F5 BIG-IP Local Traffic Manager 11.6 supports HTTP/2.[75]
  • Barracuda Networks WAF (Web Application Firewall) supports HTTP/2.[76]
  • h2o was built from the ground up for HTTP/2 support.[77]
  • HAProxy 1.8 supports HTTP/2.[78]
  • Jetty 9.3 supports HTTP/2.[79]
  • lighttpd 1.4.56 supports HTTP/2.[80]
  • LiteSpeed Web Server 5.0 supports HTTP/2.[81]
  • Microsoft IIS supports HTTP/2 in Windows 10,[82] Windows Server 2016, and Windows Server 2019.
  • Netty 4.1 supports HTTP/2.[83]
  • nginx 1.9.5 supports HTTP/2,[84] released on September 22, 2015, using module ngx_http_v2_module and HTTP/2 Server Push since version 1.13.9 on February 20, 2018.[85]
  • Node.js Stable support since 8.13.0.[86] (5.0 supports HTTP/2 with a module[87] and Node 8.4 introduced experimental built-in support for HTTP/2.[88])
  • Kestrel web server for ASP.NET Core supports HTTP/2 since .NET Core 2.2.0-preview 1.[89]
  • OpenLiteSpeed 1.3.11 and 1.4.8 supports HTTP/2.[90]
  • Proxygen supports HTTP/2.
  • Pulse Secure Virtual Traffic Manager 10.2 supports HTTP/2.[91]
  • Radware Alteon NG supports HTTP/2.[92]
  • ShimmerCat supports HTTP/2.[93]
  • Vert.x 3.3 supports HTTP/2.
  • Warp (Haskell web server, used by default in Yesod) supports HTTP/2.
  • Wildfly 9 supports HTTP/2.
  • Envoy proxy supports HTTP/2.

Content delivery networks

  • Akamai was the first major CDN to support HTTP/2 and HTTP/2 Server Push.
  • Microsoft Azure supports HTTP/2.
  • PageCDN supports HTTP/2 out of the box and provides user-interface to setup HTTP/2 Server Push in CDN dashboard.[94]
  • CDN77 supports HTTP/2 using nginx (August 20, 2015).
  • Cloudflare supports HTTP/2 using nginx with SPDY as a fallback for browsers without support, whilst maintaining all security and performance services.[95] Cloudflare was the first major CDN to support HTTP/2 Server Push.[96]
  • AWS CloudFront supports HTTP/2[97] since September 7, 2016.
  • Fastly supports HTTP/2 including Server Push.[98]
  • Imperva Incapsula CDN supports HTTP/2.[99] The implementation includes support for WAF and DDoS mitigation features as well.
  • KeyCDN supports HTTP/2 using nginx (October 6, 2015). HTTP/2 Test is a test page to verify if your server supports HTTP/2.
  • Voxility supports HTTP/2 using nginx since July, 2016. The implementation comes in support for Cloud DDoS mitigation services.[100]
  • StackPath supports HTTP/2.

Implementations

  • Other implementations are collected on the GitHub HTTP/2 wiki.

See also

  • gRPC
  • HTTP pipelining
  • HTTP request and response messages
  • HTTP/3
  • QUIC
  • SPDY
  • WebSocket
  • Web Server
  • Web Browser
  • Comparison of web browsers § Protocol support

References

  1. ^ Bright, Peter (February 18, 2015). "HTTP/2 finished, coming to browsers within weeks". Ars Technica.
  2. ^ a b Cimpanu, Catalin. "HTTP-over-QUIC to be renamed HTTP/3 | ZDNet". ZDNet. Retrieved November 19, 2018.
  3. ^ Thomson, M. (ed.), Belshe M. and R. Peon. "Hypertext Transfer Protocol version 2: draft-ietf-httpbis-http2-16". ietf.org. HTTPbis Working Group. Retrieved February 11, 2015.
  4. ^ a b c "Hypertext Transfer Protocol Bis (httpbis)". Internet Engineering Task Force. 2012.
  5. ^ "IETF HTTP Working Group". IETF HTTP Working Group. Retrieved December 15, 2019.
  6. ^ a b "History for draft-ietf-httpbis-http2-16". IETF. Retrieved January 3, 2015. 2014-12-16 IESG state changed to Publication Requested
  7. ^ a b Raymor, Brian (August 6, 2014). "Wait for it – HTTP/2 begins Working Group Last Call!". Microsoft Open Technologies. Archived from the original on October 6, 2014. Retrieved October 17, 2018.
  8. ^ a b The IESG (February 17, 2015). "Protocol Action: 'Hypertext Transfer Protocol version 2' to Proposed Standard (draft-ietf-httpbis-http2-17.txt)". httpbis (Mailing list). Retrieved February 18, 2015.
  9. ^ Mark Nottingham (February 18, 2015). "HTTP/2 Approved". ietf.org. Internet Engineering Task Force. Retrieved March 8, 2015.
  10. ^ "RFC 7540 - Hypertext Transfer Protocol Version 2 (HTTP/2)". IETF. May 2015. Retrieved May 14, 2015.
  11. ^ "See what's new in Firefox!". www.mozilla.org. Mozilla Foundation. February 2015.
  12. ^ "Can the rise of SPDY threaten HTTP?". blog.restlet.com. Restlet, Inc. October 2011. Archived from the original on January 6, 2014. Retrieved July 23, 2012.
  13. ^ "HTTP2 browser support". Retrieved March 9, 2017.
  14. ^ "Can I use... Support tables for HTML5, CSS3, etc". caniuse.com. Retrieved March 4, 2021.
  15. ^ "Usage of HTTP/2 for websites". World Wide Web Technology Surveys. W3Techs. Retrieved October 14, 2021.
  16. ^ Bishop, Mike (July 9, 2019). "Hypertext Transfer Protocol Version 3 (HTTP/3)". tools.ietf.org. Retrieved July 31, 2019.
  17. ^ "Can I use... Support tables for HTML5, CSS3, etc". caniuse.com. Retrieved January 19, 2020.
  18. ^ Cimpanu, Catalin (26 September 2019). "Cloudflare, Google Chrome, and Firefox add HTTP/3 support". ZDNet. Retrieved 27 September 2019.
  19. ^ a b Ilya Grigorik. "Chapter 12: HTTP 2.0". High Performance Browser Networking. O'Reilly Media, Inc. HTTP/2 does not modify the application semantics of HTTP in any way
  20. ^ Pratt, Michael. "Apiux". apiux.com. Retrieved March 19, 2014.
  21. ^ Dio Synodinos (November 2012). "HTTP 2.0 First Draft Published". InfoQ.com. C4Media Inc.
  22. ^ Javier Garza (October 2017). "How does HTTP/2 solve the Head of Line blocking (HOL) issue".
  23. ^ Belshe, Mike; Thomson, Martin; Peon, Roberto (May 2015). "Hypertext Transfer Protocol Version 2 (HTTP/2)". tools.ietf.org. Retrieved November 17, 2017. HTTP/2 uses DATA frames to carry message payloads. The "chunked" transfer encoding defined in Section 4.1 of [RFC7230] MUST NOT be used in HTTP/2
  24. ^ a b Sebastian Anthony (March 28, 2012). "S&M vs. SPDY: Microsoft and Google battle over the future of HTTP 2.0". ExtremeTech.
  25. ^ a b Grigorik, Ilya. "Life beyond HTTP 1.1: Google's SPDY".
  26. ^ Willy Tarreau; Amos Jeffries; Adrien de Croy; Poul-Henning Kamp (March 29, 2012). "Proposal for a Network-Friendly HTTP Upgrade". Network Working Group. Internet Engineering Task Force.
  27. ^ Doug Beaver (July 15, 2012). "HTTP2 Expression of Interest" (mailing list). W3C.
  28. ^ Dio Synodinos (November 30, 2012). "HTTP/2 First Draft Published". InfoQ.
  29. ^ a b Ilya, Grigorik (2015). HTTP/2 : a new excerpt from high performance browser networking (May 2015, First ed.). Sebastopol, Calif.: O'Reilly Media. pp. 211–224. ISBN 9781491932483. OCLC 1039459460.
  30. ^ "SPDY: An experimental protocol for a faster web". The Chromium Projects.
  31. ^ Chris Bentzel; Bence Béky (February 9, 2015). "Hello HTTP/2, Goodbye SPDY". Chromium Blog. Update: To better align with Chrome's release cycle, SPDY and NPN support will be removed with the release of Chrome 51.
  32. ^ "API Deprecations and Removals in Chrome 51". TL;DR: Support for HTTP/2 is widespread enough that SPDY/3.1 support can be dropped.
  33. ^ Shadrin, Nick (June 7, 2016). "Supporting HTTP/2 for Google Chrome Users | NGINX". NGINX. Retrieved July 10, 2017.
  34. ^ a b Nottingham, Mark (June 7, 2014). "RFC2616 is Dead". Retrieved September 20, 2014.
  35. ^ "HTTP/1.1, part 1: URIs, Connections, and Message Parsing: draft-ietf-httpbis-p1-messaging-00". December 20, 2007. Retrieved September 20, 2014.
  36. ^ "Security Requirements for HTTP: draft-ietf-httpbis-security-properties-00.txt". January 23, 2008. Retrieved September 20, 2014.
  37. ^ Nottingham, Mark (January 24, 2012). "Rechartering HTTPbis". Retrieved September 20, 2014.
  38. ^ Nottingham, Mark (October 14, 2012). "Working Group Last Call for HTTP/1.1 p1 and p2". Retrieved September 20, 2014.
  39. ^ Nottingham, Mark (October 23, 2012). "Second Working Group Last Call for HTTP/1.1 p4 to p7". Retrieved September 20, 2014.
  40. ^ "SPDY Protocol: draft-ietf-httpbis-http2-00". HTTPbis Working Group. November 28, 2012. Retrieved September 20, 2014.
  41. ^ Nottingham, Mark (November 30, 2012). "First draft of HTTP/2". Retrieved September 20, 2014.
  42. ^ "Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing". Archived from the original on August 13, 2014. Retrieved September 20, 2014.
  43. ^ "Last Call: <draft-ietf-httpbis-p1-messaging-24.txt> (Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing) to Proposed Standard". The IESG. October 21, 2013. Retrieved September 20, 2014.
  44. ^ "Protocol Action: 'Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing' to Proposed Standard (draft-ietf-httpbis-p1-messaging-26.txt)". ietf-announce (Mailing list). The IESG. February 12, 2014. Retrieved January 18, 2015.
  45. ^ The RFC Editor Team (June 6, 2014). "RFC 7230 on Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing". ietf-announce (Mailing list). Retrieved January 18, 2015. {{cite mailing list}}: |last= has generic name (help)
  46. ^ Nottingham, Mark (August 1, 2014). "Working Group Last Call: draft-ietf-httpbis-http2-14 and draft-ietf-httpbis-header-compression-09". HTTP Working Group. Retrieved September 7, 2014.
  47. ^ "Last Call: <draft-ietf-httpbis-http2-16.txt> (Hypertext Transfer Protocol version 2) to Proposed Standard from The IESG on 2014-12-31". Internet Engineering Task Force. 2014. Retrieved January 1, 2015.
  48. ^ "IESG Agenda: 2015-01-22". IETF. Archived from the original on January 15, 2015. Retrieved January 15, 2015.
  49. ^ The RFC Editor Team (May 14, 2015). "RFC 7540 on Hypertext Transfer Protocol Version 2 (HTTP/2)". ietf-announce (Mailing list). {{cite mailing list}}: |author= has generic name (help)
  50. ^ "RFC 7301 - Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension". IETF. July 2014.
  51. ^ a b "HTTP/2 Frequently Asked Questions". IETF HTTP Working Group. Retrieved September 8, 2014.
  52. ^ "Networking/http2". MozillaWiki. Retrieved September 7, 2014.
  53. ^ "HTTP/2 Implementation Status". mnot’s blog.
  54. ^ a b Kamp, Poul-Henning (January 6, 2015). "HTTP/2.0 – The IETF is Phoning It In (Bad protocol, bad politics)". ACM Queue. {{cite journal}}: Cite journal requires |journal= (help)
  55. ^ Grigorik, Ilya. "Is TLS Fast Yet?". Retrieved December 30, 2015.
  56. ^ Kamp, P. H. (2015). "Http/2.0". Communications of the ACM. 58 (3): 40. doi:10.1145/2717515. S2CID 20337779.
  57. ^ Kamp, Poul-Henning (January 7, 2015). "Re: Last Call: <draft-ietf-httpbis-http2-16.txt> (Hypertext Transfer Protocol version 2) to Proposed Standard". (Mailing list). Retrieved January 12, 2015.
  58. ^ Lear, Eliot (August 25, 2013). "Mandatory encryption *is* theater". (Mailing list). Retrieved January 26, 2015.
  59. ^ Murenin, Constantine A. (January 9, 2015). "Re: Last Call: <draft-ietf-httpbis-http2-16.txt> (Hypertext Transfer Protocol version 2) to Proposed Standard". (Mailing list). Retrieved January 12, 2015.
  60. ^ Paul Hoffman. "Minimal Unauthenticated Encryption (MUE) for HTTP-2: draft-hoffman-httpbis-minimal-unauth-enc-01". Internet Engineering Task Force.
  61. ^ Mark Nottingham; Martin Thomson. "Opportunistic Encryption for HTTP URIs: draft-nottingham-http2-encryption-03". Internet Engineering Task Force.
  62. ^ Mark Nottingham; Martin Thomson. "Opportunistic Security for HTTP: draft-ietf-httpbis-http2-encryption-01". Internet Engineering Task Force.
  63. ^ Huston, Geoff (March 4, 2019). "A Quick Look at QUIC". www.circleid.com. Retrieved August 2, 2019.
  64. ^ Gal, Shauli (June 22, 2017). "The Full Picture on HTTP/2 and HOL Blocking". Medium. Retrieved August 3, 2019.
  65. ^ "http/2 module for apache httpd". Retrieved July 28, 2015.
  66. ^ "Apache 2.4.17 release changelog". Retrieved August 22, 2017.
  67. ^ Matthew Steele (June 19, 2014). "mod_spdy is now an Apache project". Google Developers Blog.
  68. ^ "Log of /httpd/mod_spdy". svn.apache.org. Retrieved February 3, 2017.
  69. ^ "Apache Tomcat Migration". Retrieved July 29, 2016.
  70. ^ "Apache Traffic Server Downloads". trafficserver.apache.org. September 21, 2015.
  71. ^ Server, Caddy Web (March 23, 2016). "Caddy 2 - The Ultimate Server with Automatic HTTPS". caddyserver.com. Retrieved August 8, 2020.
  72. ^ "Charles 4 has HTTP/2". Public Object. August 2, 2016. Retrieved October 12, 2020.
  73. ^ "3 Simple Steps to Bring HTTP/2 Performance to Legacy Web Applications". September 22, 2015.
  74. ^ "Sucuri += HTTP/2 — Announcing HTTP/2 Support". Sucuri. November 27, 2015. Retrieved December 5, 2015.
  75. ^ Robert Haynes. "Goodbye SPDY, Hello HTTP/2". F5 Networks. Retrieved September 18, 2015.
  76. ^ Risov Chakrabortty (July 5, 2016). "New features, capabilities added to Barracuda Web Application Firewall". Barracuda Networks.
  77. ^ "H2O - the optimized HTTP/2 server". h2o.examp1e.net.
  78. ^ "What's New in HAProxy 1.8". haproxy.com. November 2017. Retrieved February 9, 2018.
  79. ^ "Jetty change log". Eclipse Foundation. May 28, 2015. Retrieved May 28, 2015.
  80. ^ "Feature #2813: Support for HTTP/2 protocol", Lighttpd
  81. ^ "LSWS 5.0 Is Out – Support for HTTP/2, ESI, LiteMage Cache". April 17, 2015.
  82. ^ Rob Trace; David Walp (October 8, 2014). "HTTP/2: The Long-Awaited Sequel". MSDN IEBlog. Microsoft Corporation.
  83. ^ "Netty.news: Netty 4.1.0.Final released". netty.io. Retrieved June 1, 2016.
  84. ^ "nginx changelog". www.nginx.com. September 22, 2015.
  85. ^ "Changes with nginx 1.14.2". nginx.org. December 4, 2018. Retrieved September 27, 2019.
  86. ^ Foundation, Node js. "Node v8.13.0 (LTS)". Node.js. Retrieved June 5, 2019.
  87. ^ "Node http2". www.github.com. July 26, 2016.
  88. ^ "Node v8.4.0 (Current)". nodejs.org. August 15, 2017.
  89. ^ "ASP.NET Core 2.2.0-preview1: HTTP/2 in Kestrel". Retrieved April 6, 2021.
  90. ^ "OpenLiteSpeed 1.4.5 change log". LiteSpeed Technologies, Inc. February 26, 2015. Retrieved February 26, 2015.
  91. ^ "Pulse Virtual Traffic Manager". August 22, 2017.
  92. ^ "Radware Combines an Integrated HTTP/2 Gateway with its Leading Fastview Technology to Provide Web Server Platforms Increased Acceleration". July 20, 2015.
  93. ^ "www.shimmercat.com". March 23, 2016.
  94. ^ "Why PageCDN, and what problem does it solve?". PageCDN. Retrieved January 11, 2020.
  95. ^ "HTTP/2 is here! Goodbye SPDY? Not quite yet". CloudFlare. Retrieved December 5, 2015.
  96. ^ Krasnov, Vlad (April 28, 2016). "Announcing Support for HTTP/2 Server Push". CloudFlare. Retrieved May 18, 2016.
  97. ^ "Amazon CloudFront now supports HTTP/2". Amazon Web Services, Inc. Retrieved September 8, 2016.
  98. ^ "Announcing Limited Availability for HTTP/2". Retrieved August 22, 2017.
  99. ^ "HTTP/2 is here: What You Need to Know". Retrieved November 1, 2015.
  100. ^ "HTTP/2 more at risk to cyber attacks?". Information Age. August 3, 2016. Retrieved February 4, 2019.

  • Official website
    Why XML language is used?
  • HTTP/2 on GitHub
  • RFC 7540 – Hypertext Transfer Protocol version 2 (HTTP/2)
  • RFC 7541 – HPACK: Header Compression for HTTP/2
  • HTTP/2 explained (Daniel Stenberg)
  • SPDY Protocol (draft-mbelshe-httpbis-spdy-00)
  • HTTP Speed+Mobility (draft-Montenegro-httpbis-speed-mobility-01)
  • Proposal for a Network-Friendly HTTP Upgrade (draft-tarreau-httpbis-network-friendly-00)

Retrieved from "https://en.wikipedia.org/w/index.php?title=HTTP/2&oldid=1104270716"