Read the Source Stream and Return an Xml Element of the Contents Java
Extensible Markup Language | |
Abbreviation | XML |
---|---|
Status | Published, W3C recommendation |
Yr started | 1996 (1996) |
Kickoff published | February 10, 1998 (1998-02-10) |
Latest version | 1.1 (2nd ed.) September 29, 2006 (2006-09-29) |
Arrangement | Www Consortium (W3C) |
Editors | Tim Bray, Jean Paoli, Michael Sperberg-McQueen, Eve Maler, François Yergeau, John W. Cowan |
Base standards | SGML |
Related standards | W3C XML Schema |
Domain | Serialization |
Website | www |
Filename extension | .xml |
---|---|
Internet media blazon | application/xml , text/xml [1] |
Uniform Type Identifier (UTI) | public.xml |
UTI conformation | public.text |
Magic number | <?xml |
Developed by | World wide web Consortium |
Type of format | Markup language |
Extended from | SGML |
Extended to | Numerous languages, including XHTML, RSS, Atom, and KML |
Standard |
|
Open format? | Yes |
Free format? | Yes |
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing capricious data. It defines a ready of rules for encoding documents in a format that is both human-readable and machine-readable. The Globe Broad Spider 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.[five]
The design goals of XML emphasize simplicity, generality, and usability beyond the Internet.[6] Information technology is a textual data format with strong support via Unicode for different human languages. Although the pattern of XML focuses on documents, the language is widely used for the representation of arbitrary information structures[7] such every bit those used in web services.
Several schema systems be to aid in the definition of XML-based languages, while programmers accept developed many application programming interfaces (APIs) to assist the processing of XML data.
Overview [edit]
The main purpose of XML is serialization, i.eastward. storing, transmitting, and reconstructing arbitrary data. For two disparate systems to substitution 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] : xi XML tags represent the data structure and comprise 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 besides referred to equally the approved schema.)[8] : 135 An XML certificate 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 employ in XML message. It defines two base media types: application/xml
and text/xml
. 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 employ of XML in a networked context appear in RFC 3470, also known as IETF BCP 70, a document roofing many aspects of designing and deploying an XML-based language.
Applications [edit]
XML has come up into common use for the interchange of data over the Internet. Hundreds of document formats using XML syntax take been adult,[9] including RSS, Atom, Office Open XML, OpenDocument, SVG, and XHTML. XML has as well provides the base of operations language for communication protocols such as Soap and XMPP. It is the message commutation format for the Asynchronous JavaScript and XML (AJAX) programming technique.
Many industry data standards, such as Health Level vii, OpenTravel Alliance, FpML, MISMO, and National Information Commutation Model are based on XML and the rich features of the XML schema specification. In publishing, Darwin Data Typing Compages is an XML industry data standard. XML is used extensively to underpin various publishing formats.
Key terminology [edit]
The textile in this department is based on the XML Specification. This is non an exhaustive list of all the constructs that appear in XML; it provides an introduction to the key constructs most oft encountered in day-to-day use.
- Character
- An XML document is a string of characters. Well-nigh every legal Unicode character may appear in an XML document.
- 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 exercise and not do, but the application is exterior 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 certificate are divided into markup and content, which may be distinguished by the awarding of elementary syntactic rules. Generally, strings that constitute markup either begin with the grapheme
<
and end with a>
, or they brainstorm with the character&
and stop with a;
. Strings of characters that are not markup are content. However, in a CDATA section, the delimiters<![CDATA[
and]]>
are classified every bit markup, while the text between them is classified as content. In add-on, whitespace before and after the outermost element is classified as markup.
- Tag
- A tag is a markup construct that begins with
<
and ends with>
. In that location are three types of tag:- kickoff-tag, such equally
<section>
; - end-tag, such as
</department>
; - empty-chemical element tag, such as
<line-interruption />
.
- kickoff-tag, such equally
- Chemical element
- An element is a logical document component that either begins with a beginning-tag and ends with a matching stop-tag or consists only of an empty-element tag. The characters betwixt the outset-tag and end-tag, if any, are the chemical element'south content, and may incorporate markup, including other elements, which are chosen child elements. An example is
<greeting>How-do-you-do, earth!</greeting>
. Another is<line-suspension />
.
- Attribute
- An attribute is a markup construct consisting of a proper noun–value pair that exists within a start-tag or empty-chemical 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 case is<step number="iii">Connect A to B.</step>
, where the name of the attribute is "number" and its value is "three". An XML aspect tin can only have a single value and each aspect tin announced at virtually 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. Normally this is either a comma or semi-colon delimited list or, if the individual values are known not to incorporate spaces,[two] a space-delimited list can exist used.<div course="inner greeting-box">Welcome!</div>
, where the attribute "course" 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-eight"?>
.
Characters and escaping [edit]
XML documents consist entirely of characters from the Unicode repertoire. Except for a small number of specifically excluded control characters, whatever grapheme defined by Unicode may announced inside the content of an XML certificate.
XML includes facilities for identifying the encoding of the Unicode characters that make up the document, and for expressing characters that, for ane reason or some other, cannot be used straight.
Valid characters [edit]
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 Render): these are the only C0 controls accustomed in XML i.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 one.1 extends the gear up of immune characters to include all the to a higher place, plus the remaining characters in the range U+0001–U+001F.[11] At the same time, nonetheless, it restricts the utilise 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 exist written in escaped form (for example U+0001 must be written as 
or its equivalent). In the case of C1 characters, this restriction is a backwards incompatibility; information technology was introduced to allow mutual encoding errors to be detected.
The lawmaking point U+0000 (Null) is the simply grapheme that is not permitted in any XML 1.0 or i.i certificate.
Encoding detection [edit]
The Unicode character set can be encoded into bytes for storage or manual in a variety of different ways, called "encodings". Unicode itself defines encodings that comprehend the entire repertoire; well-known ones include UTF-eight and UTF-16.[12] There are many other text encodings that predate Unicode, such equally ASCII and ISO/IEC 8859; their character repertoires in near every example are subsets of the Unicode character set.
XML allows the use of any of the Unicode-divers encodings and any other encodings whose characters also announced in Unicode. XML also provides a mechanism whereby an XML processor can reliably, without any prior cognition, determine which encoding is being used.[xiii] Encodings other than UTF-8 and UTF-sixteen are not necessarily recognized past every XML parser.
Escaping [edit]
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 exterior a CDATA section. It is allowed, but not recommended, to utilise "<" in XML entity values.[xiv]
- Some character encodings support merely a subset of Unicode. For instance, 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 blazon the character on the author'southward machine.
- Some characters take glyphs that cannot exist visually distinguished from other characters, such as the not-breaking space (
 
) " " and the space ( 
) " ", and the Cyrillic capital A (А
) "А" and the Latin capital letter A (A
) "A".
There are v predefined entities:
-
<
represents "<"; -
>
represents ">"; -
&
represents "&"; -
'
represents "'"; -
"
represents '"'.
All permitted Unicode characters may be represented with a numeric grapheme 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 equally 中
or 中
. Similarly, the string "I <3 Jörg" could be encoded for inclusion in an XML certificate as I <3 Jörg
.
�
is not permitted because the null graphic symbol is 1 of the control characters excluded from XML, even when using a numeric character reference.[15] An alternative encoding machinery such as Base64 is needed to represent such characters.
[edit]
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 every bit such, and there is no way to stand for characters outside the graphic symbol set of the document encoding.
An example of a valid annotate: <!--no need to escape <code> & such in comments-->
International utilise [edit]
XML 1.0 (Fifth Edition) and XML 1.i back up the direct use of almost any Unicode graphic symbol in chemical element names, attributes, comments, character information, and processing instructions (other than the ones that have special symbolic meaning in XML itself, such as the less-than sign, "<"). The post-obit is a well-formed XML document including Chinese, Armenian and Cyrillic characters:
<?xml version="i.0" encoding="UTF-8"?> <俄语 լեզու= "ռուսերեն" >данные</俄语>
Syntactical correctness and fault-handling [edit]
The XML specification defines an XML certificate every bit 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 equally
<
and&
appear except when performing their markup-delineation roles. - The start-tag, finish-tag, and empty-element tag that delimit elements are correctly nested, with none missing and none overlapping.
- Tag names are example-sensitive; the starting time-tag and terminate-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 comprise violations of well-formedness rules; they are simply non XML. An XML processor that encounters such a violation is required to report such errors and to finish normal processing. This policy, occasionally referred to as "draconian error handling," stands in notable contrast to the beliefs of programs that process HTML, which are designed to produce a reasonable event even in the presence of astringent markup errors.[17] XML's policy in this expanse has been criticized as a violation of Postel's law ("Exist conservative in what you transport; be liberal in what y'all accept").[18]
The XML specification defines a valid XML certificate as a well-formed XML document which also conforms to the rules of a Certificate Type Definition (DTD).[19] [20]
Schemas and validation [edit]
In addition to existence well-formed, an XML document may be valid. This means that it contains a reference to a Certificate 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 exist able to report it, but may go on normal processing.
A DTD is an example of a schema or grammar. Since the initial publication of XML 1.0, in that location has been substantial work in the area of schema languages for XML. Such schema languages typically constrain the prepare 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 [edit]
The oldest schema language for XML is the document blazon definition (DTD), inherited from SGML.
DTDs have the following benefits:
- DTD back up 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 let the declaration of standard public entity sets for publishing characters.
- DTDs define a document blazon rather than the types used by a namespace, thus grouping all constraints for a document in a unmarried drove.
DTDs take 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 every bit textual macros), which arrive easier to ascertain complex grammars, only at the expense of clarity.
- They employ a syntax based on regular expression syntax, inherited from SGML, to describe the schema. Typical XML APIs such every bit SAX practise not attempt to offer applications a structured representation of the syntax, so information technology is less accessible to programmers than an element-based syntax may be.
2 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 capricious 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 [edit]
A newer schema language, described past the W3C equally 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 than powerful than DTDs in describing XML languages. They employ a rich datatyping system and allow for more detailed constraints on an XML document'southward logical structure. XSDs as well use an XML-based format, which makes it possible to apply ordinary XML tools to help process them.
xs:schema element that defines a schema:
<?xml version="i.0" encoding="ISO-8859-1" ?> <xs:schema xmlns:xs= "http://world wide web.w3.org/2001/XMLSchema" ></xs:schema>
RELAX NG [edit]
RELAX NG (Regular Language for XML Next Generation) was initially specified by Oasis and is now a standard (Office two: Regular-grammar-based validation of ISO/IEC 19757 – DSDL). RELAX NG schemas may exist written in either an XML based syntax or a more meaty not-XML syntax; the 2 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, tin require values in an XML document to suit to definitions in XML Schema Datatypes.
Schematron [edit]
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 at present a standard (Office 3: Rule-based validation of ISO/IEC 19757 – DSDL).
DSDL and other schema languages [edit]
DSDL (Document Schema Definition Languages) is a multi-part ISO/IEC standard (ISO/IEC 19757) that brings together a comprehensive prepare of small-scale schema languages, each targeted at specific problems. DSDL includes RELAX NG full and compact syntax, Schematron exclamation language, and languages for defining datatypes, grapheme repertoire constraints, renaming and entity expansion, and namespace-based routing of document fragments to different validators. DSDL schema languages do not take 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 non just depict the structure of a detail XML format but also offer express facilities to influence processing of individual XML files that conform to this format. DTDs and XSDs both have this ability; they tin for example provide the infoset augmentation facility and attribute defaults. RELAX NG and Schematron intentionally do not provide these.
[edit]
A cluster of specifications closely related to XML have been adult, starting shortly after the initial publication of XML one.0. It is ofttimes the instance that the term "XML" is used to refer to XML together with i or more of these other technologies that accept come to be seen every bit office of the XML core.
- XML namespaces enable the same document to incorporate XML elements and attributes taken from dissimilar vocabularies, without any naming collisions occurring. Although XML Namespaces are not part of the XML specification itself, about 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 inside the scope of a unmarried XML element. - XML Information Gear up or XML Infoset is an abstract data model for XML documents in terms of information items. The infoset is usually 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 iii parts:
- XSLT (XSL Transformations), an XML linguistic communication for transforming XML documents into other XML documents or other formats such equally HTML, plain text, or XSL-FO. XSLT is very tightly coupled with XPath, which it uses to address components of the input XML certificate, mainly elements and attributes.
- XSL-FO (XSL Formatting Objects), an XML linguistic communication for rendering XML documents, ofttimes 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 information.
- XQuery (XML Query) is an XML query linguistic communication strongly rooted in XPath and XML Schema. It provides methods to access, dispense 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 whatsoever xml document with any of the schema types mentioned above.
Some other specifications conceived equally role of the "XML Cadre" have failed to find wide adoption, including XInclude, XLink, and XPointer.
Programming interfaces [edit]
The pattern goals of XML include, "It shall exist easy to write programs which process XML documents."[vi] Despite this, the XML specification contains near no data about how programmers might become nearly doing such processing. The XML Infoset specification provides a vocabulary to refer to the constructs within an XML document, only does not provide whatever guidance on how to access this information. A variety of APIs for accessing XML have been developed and used, and some accept 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 instance 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 crave less retentiveness and, for certain tasks based on a linear traversal of an XML document, are faster and simpler than other alternatives. Tree-traversal and information-binding APIs typically require the use of much more retention, but are oft found more convenient for utilize by programmers; some include declarative retrieval of certificate 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 than for searching of large XML databases.
Uncomplicated API for XML [edit]
Simple API for XML (SAX) is a lexical, event-driven API in which a certificate is read serially and its contents are reported equally callbacks to diverse methods on a handler object of the user's blueprint. SAX is fast and efficient to implement, just difficult to use for extracting information at random from the XML, since it tends to burden the application author with keeping track of what office 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 [edit]
Pull parsing treats the document as a series of items read in sequence using the iterator pattern pattern. This allows for writing of recursive descent parsers in which the construction of the code performing the parsing mirrors the structure of the XML being parsed, and intermediate parsed results tin exist used and accessed as local variables inside the functions performing the parsing, or passed downwards (as role 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 information in an XML certificate. Code that uses this iterator can test the current particular (to tell, for example, whether information technology is a starting time-tag or end-tag, or text), and inspect its attributes (local proper name, namespace, values of XML attributes, value of text, etc.), and can also move the iterator to the next particular. The code can thus extract information from the certificate 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 inside a stack of elements that are parent elements of the element being parsed. Pull-parsing lawmaking can be more straightforward to understand and maintain than SAX parsing code.
Document Object Model [edit]
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 past a parser, or can be generated manually past 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 exist loaded into retentiveness and constructed every bit a tree of objects before access is allowed.
Data binding [edit]
XML data bounden 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 exist identified at compile time rather than run-time. Information technology is suitable for applications where the document structure is known and fixed at the fourth dimension the application is written. Example data bounden systems include the Java Compages for XML Binding (JAXB), XML Serialization in .NET Framework.[22] and XML serialization in gSOAP.
XML as data type [edit]
XML has appeared as a first-class information type in other languages. The ECMAScript for XML (E4X) extension to the ECMAScript/JavaScript language explicitly defines ii specific objects (XML and XMLList) for JavaScript, which back up XML document nodes and XML node lists equally distinct objects and use a dot-notation specifying parent-child relationships.[23] E4X is supported past the Mozilla ii.5+ browsers (though now deprecated) and Adobe Actionscript, but has not been adopted more universally. Like notations are used in Microsoft'south LINQ implementation for Microsoft .Cyberspace three.v and higher up, and in Scala (which uses the Coffee VM). The open-source xmlsh application, which provides a Linux-like shell with special features for XML manipulation, similarly treats XML equally a information type, using the <[ ]> annotation.[24] The Resource Description Framework defines a data blazon rdf:XMLLiteral
to hold wrapped, canonical XML.[25] Facebook has produced extensions to the PHP and JavaScript languages that add together XML to the core syntax in a similar way to E4X, namely XHP and JSX respectively.
History [edit]
XML is an application profile of SGML (ISO 8879).[26]
The versatility of SGML for dynamic information display was understood past early digital media publishers in the tardily 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 continued in the pocket-sized community of people who had feel both in SGML and the Web.[29]
XML was compiled by a working grouping of 11 members,[30] supported by a (roughly) 150-member Interest Group. Technical debate took place on the Involvement Group mailing list and issues were resolved past consensus or, when that failed, bulk vote of the Working Group. A record of blueprint decisions and their rationales was compiled by Michael Sperberg-McQueen on December four, 1997.[31] James Clark served every bit Technical Lead of the Working Grouping, notably contributing the empty-element <empty />
syntax and the name "XML". Other names that had been put forrard for consideration included "MAGMA" (Minimal Architecture for Generalized Markup Applications), "SLIM" (Structured Language for Cyberspace 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 accustomed a consulting appointment 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'due south Jean Paoli equally a third co-editor.
The XML Working Group never met face-to-face; the design was achieved using a combination of email and weekly teleconferences. The major blueprint decisions were reached in a brusk burst of intense work between August and Nov 1996,[32] when the first Working Draft of an XML specification was published.[33] Further pattern work connected through 1997, and XML 1.0 became a W3C Recommendation on February 10, 1998.
Sources [edit]
XML is a profile of an ISO standard SGML, and nigh 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-subclass syntax. The SGML proclamation was removed; thus XML has a stock-still delimiter set and adopts Unicode equally the document character set.
Other sources of technology for XML were the TEI (Text Encoding Initiative), which defined a contour of SGML for use as a "transfer syntax"; and HTML, in which elements were synchronous with their resource, document character sets were split up from resource encoding, the xml:lang
attribute was invented, and (like HTTP) metadata accompanied the resource rather than being needed at the annunciation of a link. The ERCS(Extended Reference Concrete Syntax) project of the SPREAD (Standardization Project Regarding Due east Asian Documents) project of the ISO-related China/Nippon/Korea Document Processing skillful group was the basis of XML i.0'due south naming rules; SPREAD as well introduced hexadecimal numeric character references and the concept of references to brand bachelor 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 adult during discussion that are novel in XML included the algorithm for encoding detection and the encoding header, the processing instruction target, the xml:infinite aspect, and the new close delimiter for empty-element tags. The notion of well-formedness every bit opposed to validity (which enables parsing without a schema) was kickoff 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 arrangement; Mentor Graphics Context; Interleaf and Xerox Publishing System.
Versions [edit]
i.0 and 1.1 [edit]
The first (XML one.0) was initially divers in 1998. Information technology has undergone small revisions since and so, without being given a new version number, and is currently in its 5th edition, as published on November 26, 2008. It is widely implemented and still recommended for full general use.
The second (XML one.1) was initially published on February iv, 2004, the same solar day as XML 1.0 Third Edition,[35] and is currently in its second edition, equally published on August 16, 2006. It contains features (some contentious) that are intended to make XML easier to utilise in sure cases.[36] The primary changes are to enable the utilize 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 utilise only by those who need its particular features.[37]
Prior to its fifth edition release, XML 1.0 differed from XML 1.ane in having stricter requirements for characters available for use in chemical element and aspect names and unique identifiers: in the first four editions of XML i.0 the characters were exclusively enumerated using a specific version of the Unicode standard (Unicode 2.0 to Unicode iii.2.) The fifth edition substitutes the machinery of XML 1.one, which is more futurity-proof simply reduces redundancy. The approach taken in the fifth edition of XML i.0 and in all editions of XML 1.i is that only certain characters are forbidden in names, and everything else is allowed to suit suitable name characters in future Unicode versions. In the 5th 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 indicate can exist used in the grapheme data and attribute values of an XML i.0 or ane.1 document, even if the character corresponding to the lawmaking indicate is not defined in the current version of Unicode. In character information and aspect values, XML one.i allows the utilize of more command characters than XML one.0, but, for "robustness", most of the command characters introduced in XML ane.1 must be expressed as numeric character references (and #x7F through #x9F, which had been allowed in XML i.0, are in XML ane.1 fifty-fifty required to exist 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 merely control codes that can exist written directly.
2.0 [edit]
In that location has been discussion of an XML 2.0, although no arrangement has appear 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 two.0 might look like, including emptying of DTDs from syntax, as well as integration of XML namespaces, XML Base and XML Information Set into the base standard.
Binary XML [edit]
The World Wide Web Consortium likewise has an XML Binary Label Working Grouping doing preliminary research into use cases and properties for a binary encoding of XML Information Gear up. 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 ain binary format (ITU-T Rec. 10.891 and ISO/IEC 24824-one) to avoid confusion.
Criticism [edit]
XML and its extensions have regularly been criticized for verbosity, complexity and redundancy.[forty]
Mapping the bones tree model of XML to type systems of programming languages or databases can be hard, especially when XML is used for exchanging highly structured data between applications, which was not its primary design goal. Still, XML data binding systems permit applications to admission XML data direct from objects representing a information structure of the data in the programming language used, which ensures type safety, rather than using the DOM or SAX to recall data from a direct representation of the XML itself. This is accomplished past 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 endeavor 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 equally simpler alternatives (see Comparing of data serialization formats)[42] that focus on representing highly structured information rather than documents, which may comprise 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 besides [edit]
- List of XML markup languages
- List of XML schemas
- Extensible programming
- Comparing of layout engines (XML)
- Comparison of data serialization formats
- Binary XML
- EBML
- WBXML
- XML Protocol
Notes [edit]
- ^ i.e., embedded quote characters would be a problem
- ^ A common instance of this is CSS form or identifier names.
References [edit]
- ^ "XML Media Types, RFC 7303". Internet Applied science Task Force. July 2014.
- ^ "XML 1.0 Specification". Earth Wide Web Consortium. Retrieved 22 Baronial 2010.
- ^ "Extensible Markup Linguistic communication (XML) 1.0". world wide web.w3.org.
- ^ "XML and Semantic Web W3C Standards Timeline" (PDF). Dblab.ntua.gr. Archived from the original (PDF) on 24 Apr 2013. Retrieved xiv August 2016.
- ^ "W3C Certificate LICENSE". W3.org . Retrieved 24 July 2020.
- ^ a b "XML ane.0 Origin and Goals". W3.org . Retrieved 14 Baronial 2016.
- ^ Fennell, Philip (June 2013). "Extremes of XML". XML London 2013: 80–86. doi:10.14337/XMLLondon13.Fennell01. ISBN978-0-9926471-0-0.
- ^ a b c d eastward Dykes, Lucinda (2005). XML for Dummies (4th ed.). Hoboken, North.J.: Wiley. ISBN978-0-7645-8845-7.
- ^ "XML Applications and Initiatives". Xml.coverages.org . Retrieved xvi November 2017.
- ^ "Extensible Markup Language (XML) one.0 (5th Edition)". Www Consortium. 2008-11-26. Retrieved 23 Nov 2012.
- ^ "Extensible Markup Language (XML) i.1 (2d Edition)". World Wide Web Consortium. Retrieved 22 August 2010.
- ^ "Characters vs. Bytes". Tbray.org . Retrieved 16 November 2017.
- ^ "Autodetection of Character Encodings". W3.org . Retrieved sixteen Nov 2017.
- ^ "Extensible Markup Language (XML) 1.0 (Fifth Edition)". W3.org . Retrieved sixteen Nov 2017.
- ^ "W3C I18N FAQ: HTML, XHTML, XML and Control Codes". W3.org . Retrieved sixteen Nov 2017.
- ^ "Extensible Markup Language (XML)". W3.org . Retrieved xvi November 2017. Section "Comments"
- ^ Pilgrim, Mark (2004). "The history of callous error handling in XML". Archived from the original on 2011-07-26. Retrieved 18 July 2013.
- ^ "There are No Exceptions to Postel's Law [dive into marking]". DiveIntoMark.org. Archived from the original on 2011-05-14. Retrieved 22 April 2013.
- ^ "XML Notepad". Xmlnotepad/codeplex.com. Archived from the original on 15 November 2017. Retrieved 16 Nov 2017.
- ^ "XML Notepad 2007". Microsoft.com . Retrieved 16 November 2017.
- ^ DuCharme, Bob. "Push, Pull, Next!". Xml.com . Retrieved 16 Nov 2017.
- ^ "XML Serialization in the .Net Framework". Msdn.microsoft.com . Retrieved 31 July 2009.
- ^ "Processing XML with E4X". Mozilla Developer Center. Mozilla Foundation.
- ^ "XML Shell: Core Syntax". Xmlsh.org. 2010-05-13. Retrieved 22 August 2010.
- ^ "Resource Description Framework (RDF): Concepts and Abstract Syntax". W3.org. Retrieved 22 August 2010.
- ^ "ISO/IEC 19757-3". ISO/IEC. 1 June 2006: vi.
- ^ Bray, Tim (February 2005). "A conversation with Tim Bray: Searching for ways to tame the earth'southward vast stores of information". Association for Computing Machinery's "Queue site". Retrieved sixteen April 2006.
- ^ Ambron, Sueann & Hooper, Kristina, eds. (1988). "Publishers, multimedia, and interactivity". Interactive multimedia . Cobb Group. ISBN1-55615-124-1.
- ^ Eliot Kimber (2006). "XML is 10". Drmacros-xml-rants.blogspot.com . Retrieved sixteen November 2017.
- ^ The working grouping was originally chosen the "Editorial Review Lath." The original members and seven who were added before the first edition was complete, are listed at the stop of the first edition of the XML Recommendation, at http://world wide web.w3.org/TR/1998/REC-xml-19980210.
- ^ "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.
- ^ "Oracle Technology Network for Coffee Developers - Oracle Technology Network - Oracle". Java.lord's day.com . Retrieved 16 November 2017.
- ^ "Extensible Markup Language (XML)". W3.org. 1996-xi-fourteen. Retrieved 31 July 2009.
- ^ 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.
- ^ "Extensible Markup Linguistic communication (XML) one.0 (Third Edition)". W3.org. Retrieved 22 August 2010.
- ^ a b "Extensible Markup Language (XML) 1.1 (Second Edition) , Rationale and list of changes for XML 1.one". W3.org . Retrieved 20 January 2012.
- ^ Harold, Elliotte Rusty (2004). Constructive XML . Addison-Wesley. pp. 10–xix. ISBN0-321-15040-6.
- ^ "Extensible Markup Linguistic communication (XML) 1.1 (2nd Edition)". W3.org. Retrieved 22 August 2010.
- ^ Bray, Tim (10 Feb 2002). "Extensible Markup Language, SW (XML-SW)".
- ^ "XML: The Angle Bracket Tax". Codinghorror.com. eleven May 2008. Retrieved 16 November 2017.
- ^ "The Myth of Self-Describing XML" (PDF). Workflow.HealthBase.info. September 2003. Retrieved 16 November 2017.
- ^ "What usable alternatives to XML syntax practise you know?". StackOverflow.com . Retrieved 16 November 2017.
Further reading [edit]
- Annex A of ISO 8879:1986 (SGML)
- Lawrence A. Cunningham (2005). "Language, Deals and Standards: The Future of XML Contracts". Washington University Police force 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 Oct 2009.
- Kelly, Sean (February six, 2006). "Making Mistakes with XML". Programmer.com . Retrieved 26 October 2010.
- St. Laurent, Simon (February 12, 2003). "Five Years Later, XML." O'Reilly XML Blog. O'Reilly Media. Retrieved 26 Oct 2010.
- "W3C XML is Ten!". World Broad Web Consortium. 12 Feb 2008. Retrieved 26 October 2010.
- "Introduction to XML" (PDF). Course Slides. Pierre Geneves. Oct 2012. Archived from the original on 2015-ten-16.
{{cite web}}
: CS1 maint: bot: original URL status unknown (link)
External links [edit]
Wikimedia Commons has media related to XML. |
- W3C XML homepage
- XML one.0 Specification
- Retrospective on Extended Reference Concrete Syntax past 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 past Peter Flynn
Source: https://en.wikipedia.org/wiki/XML