Fact-checked by Grok 2 weeks ago

XML

Extensible Markup Language (XML) is a and system for creating specialized markup languages that encode documents and data in a format both human-readable and machine-interpretable, enabling the structured representation, storage, transmission, and processing of information. Developed by the (W3C), XML originated as a simplified subset of the (SGML, ISO 8879) to address the need for a versatile, web-friendly standard for data interchange beyond HTML's presentation focus. First published as a W3C Recommendation on February 10, 1998, XML emphasizes extensibility, allowing users to define custom tags and attributes for domain-specific applications while enforcing strict syntax rules for well-formedness and optional validity. XML's core purpose is to structure data—such as in spreadsheets, transactions, , or configuration parameters—in a platform-independent, text-based format that prioritizes clarity, , and ease of over compactness. It supports for , entities for modular content reuse, and partial logical structuring through markup, with processors providing applications access to the document's content and hierarchy. Unlike fixed-format languages, XML's design goals include straightforward implementation, minimal optional features, and compatibility with both SGML legacy systems and emerging web technologies, making it suitable for large-scale , electronic commerce, and automated . Since its inception in the mid-1990s amid growing demands for robust data exchange on the Internet, XML has evolved through multiple editions, with the fifth edition of XML 1.0 issued in 2008 to incorporate errata and clarifications. It forms the basis for a family of standards, including XML Namespaces for modularity, XLink and XPointer for linking, XSL for transformations, the Document Object Model (DOM) for programmatic access, and XML Schema for precise data typing and constraints. XML's impact extends to foundational roles in web services like SOAP, the Resource Description Framework (RDF) for the Semantic Web, and XHTML as an XML-compliant evolution of HTML, fostering widespread adoption in industries from software development to scientific data sharing.

Introduction

Overview

Extensible Markup Language (XML) is a W3C recommendation that defines a flexible, text-based format for representing structured data, enabling the creation of custom markup languages tailored to specific domains. As a subset of the (SGML), XML facilitates the storage, transport, and reconstruction of information in a platform-independent manner, making it ideal for data interchange between diverse systems and applications. Its design emphasizes interoperability, allowing developers to define their own tags and hierarchies without predefined vocabularies, unlike more rigid formats. The XML 1.0 specification, published in , established core design goals to ensure its practicality and longevity, including straightforward usability over the for easy transmission and processing, support for a wide variety of applications to promote extensibility, human-legibility for without specialized tools, and a formal, concise structure that prioritizes simplicity and platform independence. These principles result in XML documents that are both machine-readable and human-understandable, with a clear separation between content and presentation—content is marked up semantically, while styling or rendering is handled by external processors or stylesheets. Key features include a hierarchical structure using opening and closing tags to nest elements, attributes for additional within tags, and text content for data values, all enclosed in a single to form a well-formed tree. For illustration, consider a basic XML document representing a book catalog entry:
<catalog>
  <book id="bk001">
    <title>Learning XML</title>
    <author>Erik T. Ray</author>
    <genre>Technical</genre>
    <price>39.95</price>
  </book>
</catalog>
This example demonstrates the hierarchical nesting and attribute usage without delving into validation or processing. XML's foundational role in web standards persists into 2025, underpinning technologies like web services, configuration files, and data serialization in industries ranging from to , with broad adoption for reliable, standardized across global systems.

History

The roots of XML trace back to the 1960s with the development of Generalized Markup Language (GML) by researchers Charles Goldfarb, Edward Mosher, and Raymond Lorie, which introduced descriptive markup to separate content from formatting for document processing. This evolved into (SGML), formalized as ISO standard 8879 in 1986, providing a for defining markup languages suitable for complex document interchange. The W3C established its SGML Editorial Review Board in June 1996. In August 1996, , Director of the (W3C), highlighted the need for a simplified subset of SGML to enable structured data exchange on the in his paper "The : Past, Present and Future." The board transitioned into the XML Working Group in 1997 under the chairmanship of Jon Bosak from , involving key contributors from industry and academia to streamline SGML for broader adoption. The group focused on creating a lightweight, extensible format for data representation while retaining SGML's core principles of separation between content and presentation. XML 1.0 was released as a W3C Recommendation on February 10, 1998, marking its official standardization as a simplified SGML subset designed for platform-independent data exchange. Subsequent milestones included the "Namespaces in XML" specification on January 14, 1999, which addressed name conflicts in modular XML documents by associating elements and attributes with unique identifiers. In 2000, XML integrated with through 1.0, released as a W3C Recommendation on January 26, which reformulated 4 as an XML application to enhance strictness and extensibility in web authoring. That same year, the Simple Object Access Protocol () 1.1 emerged on May 8 as a W3C Note, leveraging XML for messaging in distributed web services environments. , finalized as a W3C Recommendation on May 2, 2001, provided a more powerful validation mechanism beyond SGML's DTDs, supporting complex data types and structures. As of 2025, the W3C maintains XML through active Working Groups such as XML Core, , and XML Query, focusing on errata corrections, testing, and enhancements like Efficient XML Interchange (EXI) for compact representations, without major new releases since XML 1.1 in 2006. This ongoing stewardship ensures XML's enduring role in legacy systems, configuration files, and emerging standards for (IoT) data interchange, where its structured format supports reliable machine-to-machine communication.

Core Concepts

Key Terminology

In XML, an element is the fundamental unit of structure, consisting of a start-tag (e.g., <element>) that begins the and an end-tag (e.g., </element>) that concludes it, with optional content such as text or nested elements in between. Elements may also be self-closing as empty-element tags (e.g., <element/>). For instance, <greeting>Hello, world!</greeting> represents a complete element containing textual content. Attributes provide additional information about through name-value pairs specified within the start-tag or empty-element tag, such as name="value". These pairs associate with the element, like <termdef id="dt-dog" term="dog">Four-legged animal</termdef>, where id and term are attributes. Attribute values must be quoted and cannot contain markup unless entity-referenced. A namespace qualifies element and attribute names to prevent conflicts in documents combining vocabularies from multiple sources, using a URI as the namespace identifier and an optional prefix. Namespace declarations appear as attributes, such as xmlns:prefix="http://example.org/namespace", binding the prefix to the URI for use in qualified names like <prefix:element>. For example, <x xmlns:edi="http://ecommerce.example.org/schema"><edi:order>Item</edi:order></x> qualifies the order element to avoid ambiguity with other uses of "order". Default namespaces apply to unprefixed names via xmlns="URI". Entities serve as placeholders for text or external resources, enabling replacements during parsing; they include predefined entities like &lt; for < and custom ones declared in the document type definition. Predefined entities escape special characters, such as &amp; for &, ensuring markup integrity. Custom entities are declared as <!ENTITY name "replacement text">, like <!ENTITY Pub-Status "This is a pre-release document.">, and referenced as &Pub-Status;. The precedes the document's content, optionally including an XML declaration (e.g., <?xml version="1.0" encoding="UTF-8"?>) to specify version and encoding, followed by a DOCTYPE declaration for validation rules. The , also called the document element, is the single top-level element enclosing all others, such as <greeting> in a simple document. In the logical tree model, elements form hierarchical relationships: a element contains elements, while siblings share the same parent, as in <parent><child1/><child2/></parent> where child1 and child2 are siblings. An XML document is well-formed if it adheres to syntactic rules, such as proper tag matching and no overlapping elements, regardless of content semantics. In contrast, a document is valid only if it is well-formed and conforms to constraints in an associated or DTD, ensuring semantic correctness. Parsed entities contain text that the processor interprets for markup and entities, forming the replacement text during parsing. Unparsed entities, however, reference non-XML data like images via a notation (e.g., <!ENTITY image SYSTEM "file.gif" NDATA gif>), which the processor does not parse but passes to an application.

Document Structure

XML documents are logically structured as a , with a single that encloses all other content, forming a hierarchical collection of nodes including elements, text, attributes, and other constructs. This ensures that elements nest properly, where each non-root element has exactly one parent, and no part of the appears within any other element's content. The precedes the and may include an XML declaration and a DOCTYPE declaration. The XML declaration, if present, specifies the version of XML (typically "1.0") and optionally the encoding and a standalone attribute indicating whether the document relies on external markup declarations. For example, <?xml version="1.0" encoding="[UTF-8](/page/UTF-8)" standalone="yes"?> declares an XML 1.0 document with UTF-8 encoding that does not require external subsets for parsing. The DOCTYPE declaration identifies the 's name and may reference an external DTD subset for defining the document's structure, appearing only in the before the . Within the root element, content follows a model that supports mixed content, allowing interspersing of text and child elements. Empty elements, which contain no content, are represented with a self-closing tag such as <img/>. sections enable inclusion of raw character data without markup interpretation, delimited by <![CDATA[ and ]]>, useful for embedding text that might otherwise require escaping. A simple example of an XML document structure is a basic feed skeleton, illustrating the , root element, and nested content:
xml
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Example Feed</title>
    <description>A sample RSS feed</description>
    <item>
      <title>Sample Item</title>
      <link>https://example.com/item</link>
      <description><![CDATA[This is <b>mixed content</b> with raw data.]]></description>
    </item>
  </channel>
</rss>
This structure features the XML declaration in the , the <rss> enclosing a <channel> with mixed text and an empty-capable <item> that uses a section.

Syntax and Encoding

Valid Characters and Escaping

XML documents are composed of characters drawn from the character set, with specific restrictions defining the valid character repertoire to ensure portability and . In XML 1.0, the valid characters are defined by production in the specification as follows: Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]. This includes the tab (#x9), line feed (#xA), and (#xD) control characters, along with all characters in the specified ranges, excluding (U+D800–U+DFFF), non-characters like U+FFFE and U+FFFF, and certain other disallowed code points such as those in [#x7F-#x84] and [#x86-#x9F]. Other control characters (e.g., from #x1 to #x8 or #xB to #x1F) are not permitted in unescaped form. In contrast, XML 1.1 expands the valid character set to accommodate a broader range of , defined by production as Char ::= [#x1-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]. This allows characters from #x1 to #x1F and #x7F to #x9F, but classifies certain ones as "restricted characters" (production [2a]: RestrictedChar ::= [#x1-#x8] | [#xB-#xC] | [#xE-#x1F] | [#x7F-#x84] | [#x86-#x9F]) that must be represented using character references rather than appearing directly. Like XML 1.0, XML 1.1 excludes and non-characters. , which are used in UTF-16 encoding for supplementary characters, are permitted in XML 1.1 only when properly paired, but XML 1.0 prohibits them entirely to avoid encoding ambiguities. To include reserved characters or invalid ones in content, XML provides escaping mechanisms through entity references. The ampersand (&), less-than sign (<), greater-than sign (>), apostrophe ('), and quotation mark (") are reserved and must be escaped in element content and attributes: &amp; for &, &lt; for <, &gt; for >, &apos; for ', and &quot; for ". These predefined general entities are recognized by all conforming XML processors. Additionally, any valid Unicode character can be represented using numeric character references in decimal form (&#decimal;) or hexadecimal form (&#xhex;), such as &#60; or &#x3C; for <. These references are expanded by the processor into the corresponding character data before further processing. The same escaping rules apply in XML 1.1. Escaping requirements differ slightly between element content and attribute values. In element content, the sequence ]]> must be escaped as ]]&gt; to avoid mimicking the end of a CDATA section, though > itself need not be escaped except in this case. In attribute values, escaping depends on the quoting style: single quotes require escaping of apostrophes, while double quotes require escaping of quotation marks. For example, the XML fragment <element attr="value &amp; more">content &lt; text</element> correctly escapes the ampersand in the attribute and the less-than in the content. A common pitfall arises when embedding URLs or other data containing unescaped ampersands, such as in query parameters (e.g., http://example.com?param1=value1&param2=value2), which must be written as http://example.com?param1=value1&amp;param2=value2 to prevent the parser from interpreting the second ampersand as the start of an entity reference. Failure to escape such characters results in a well-formedness error, as the document would no longer conform to the syntactic rules. Encoding declarations ensure these characters are interpreted correctly across different byte representations.

Encoding and Internationalization

XML documents specify their character encoding through an optional declaration in the , typically as part of the XML declaration at the beginning of the file, such as <?xml version="1.0" encoding="UTF-8"?>. This declaration identifies the encoding used to map the document's bytes to characters, with supported values including , UTF-16, ISO-10646-UCS-2, ISO-8859 series, and others registered with IANA. If no encoding is declared, XML processors default to or UTF-16, determined through autodetection mechanisms. Encoding autodetection relies on a (BOM) or heuristics applied to the initial bytes of the document. For UTF-16, a BOM consisting of the Unicode character U+FEFF (encoded as 0xFEFF for big-endian or 0xFFFE for little-endian) signals the encoding and byte order; XML processors must recognize this to distinguish between and UTF-16. Without a BOM, processors use a algorithm examining the first four octets—for instance, the sequence 0x00 0x00 0x00 0x3C indicates UTF-32 big-endian, while 0x3C 0x3F 0x78 0x6D (corresponding to "<?xm") suggests . Documents containing non-ASCII characters in the first few octets require either /UTF-16 encoding or an explicit declaration to ensure reliable parsing. XML provides comprehensive support for internationalization through its foundation on the Unicode standard (ISO/IEC 10646), enabling representation of text from virtually all writing systems worldwide. This includes full handling of combining characters, such as diacritics (e.g., U+0301 COMBINING ACUTE ACCENT), which allow normalized forms for multilingual content without altering semantic meaning. Bi-directional text, common in scripts like Arabic or Hebrew (right-to-left, RTL), is supported via Unicode's bidirectional algorithm, with XML markup like the dir attribute (e.g., dir="rtl") recommended to override or clarify directionality in mixed-language documents. Language identification using the xml:lang attribute further aids processing of multilingual elements. In practice as of 2025, UTF-8 has become the predominant encoding for XML documents, used in over 98% of web-based contexts due to its compatibility, efficiency for ASCII-dominant text, and status as the XML default. Legacy encodings like (Latin-1) are still supported but require explicit declaration and are discouraged for new documents to avoid portability issues; processors must handle them if declared, though transitioning to UTF-8 ensures broader Unicode coverage. Best practices emphasize always declaring UTF-8 explicitly, even when it's the default, to prevent misinterpretation, and using Unicode normalization (e.g., NFC) for consistent handling of combining sequences. For example, an XML document mixing English and Chinese scripts might declare to properly encode characters like "世界" (U+4E16 U+754C):
<?xml version="1.0" encoding="UTF-8"?>
<document xml:lang="en">
  <title>Hello, World! 你好,世界!</title>
  <p>This is a multilingual example supporting both LTR and CJK scripts.</p>
</document>
This ensures the processor correctly interprets the bytes as characters without fallback errors.

Comments and Processing Instructions

In XML documents, comments provide a mechanism for including non-essential information intended for human readers or documentation purposes, without affecting the processing of the document's data. The syntax for a comment begins with <!-- and ends with --> , enclosing any permitted character data except the sequence -- , which is forbidden to avoid ambiguity in parsing. Comments must be well-formed and cannot nest, as the closing --> terminates the first encountered comment. They are not considered part of the document's character data and may be ignored by processors, though applications can choose to retrieve them if needed. For example, a comment might appear as <!-- This is a note about the following element --> , placed anywhere in the markup outside of tags, attribute values, or other comments. Processing instructions (PIs) serve as directives from the document author to an application or processor, allowing customization of how the XML is handled without altering the core data structure. The syntax starts with <? followed by a target name (a Name production not case-insensitively matching "xml"), optional whitespace and data (which cannot contain the sequence ?>), and ends with ?> . Parameter entity references are not recognized within PIs, ensuring they are treated as literal instructions. Like comments, PIs can appear anywhere in the document except inside tags or other markup, and they are excluded from character data, passing directly to the application for interpretation. The XML declaration itself, such as <?xml version="1.0" encoding="UTF-8"?> , functions as a special form of PI and must precede any other content to specify version and encoding details. A common use case for PIs is linking external resources, such as stylesheets for rendering; for instance, <?xml-stylesheet type="text/xsl" href="style.xsl"?> associates an stylesheet with the document, enabling transformation instructions for the processor. PIs are also employed for tool-specific directives, like directing editors or validators to apply custom behaviors, though their targets must avoid reserved names to prevent conflicts. In extensions or application-specific XML dialects, PIs might support conditional logic, but standard XML restricts them to straightforward, non-data instructions to maintain portability across processors.

Well-Formedness and Error Handling

Syntactical Correctness

A well-formed XML document adheres to the syntactic rules defined in the Extensible Markup Language (XML) 1.0 specification, ensuring it can be parsed unambiguously without requiring external validation. These rules guarantee that the document consists of properly structured elements, attributes, and text content, forming a single, hierarchical tree with exactly one root element that contains all other content. No part of the document may lie outside this root element, and elements must nest correctly without overlapping, meaning the start-tag of an element must precede its content and end-tag, with no interleaving of other elements' tags. Key criteria for include the requirement that every start-tag has a matching end-tag, or for empty elements, a self-closing tag is used, such as <element/>. Attribute values must be enclosed in single or double quotes to delimit them properly from the surrounding markup. The document must not contain any standalone tags or unclosed structures that could lead to . XML tags are case-sensitive, so <Element> and <element> are treated as distinct names, enforcing precise matching between start and end tags. Within a single start-tag, attribute names must be unique; duplicates, such as <element attr="value" attr="another">, violate this rule and render the document ill-formed. Empty elements may be represented either as <element></element> or the more concise <element/>, but the latter explicitly indicates emptiness to aid . Namespaces extend these rules by allowing qualified names for elements and attributes, which must be properly declared to maintain . A namespace is declared via an attribute like xmlns:prefix="http://example.com/[namespace](/page/Namespace)", binding the prefix to a within the scope from the declaring 's start-tag to its corresponding end-tag. Default namespaces, declared as xmlns="http://example.com/default", apply to unprefixed elements in the scope but not to attributes, which remain in no namespace unless prefixed. Undeclared prefixes in qualified names, such as using prefix:element without prior , result in an ill-formed . Common syntactical errors that prevent include mismatched tags, where an end-tag like </element> does not correspond to its start-tag <other>, and unquoted attribute values, such as attr=value instead of attr="value". Tools like xmllint, part of the library, can validate these aspects by parsing the document and reporting violations, for instance, via the command xmllint --noout file.xml, which checks for without output if successful. The following example illustrates a well-formed XML snippet:
xml
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns="http://example.com/default">
  <child attr="value">Text content</child>
  <empty/>
</root>
This adheres to all rules: single root, proper nesting, quoted attributes, and self-closing empty element. In contrast, an ill-formed version might be:
xml
<root>
  <child attr=value>Text</child>  <!-- Unquoted attribute -->
  <another></root>  <!-- Mismatched end-tag -->
</another>
Such errors cause to fail immediately upon encountering the violation.

Error Detection and Recovery

In XML, are classified into two primary categories: fatal errors and non-fatal . A fatal error is defined as a violation that a conforming XML processor must detect and report to the application, after which it must not continue normal processing. Non-fatal errors, in contrast, may be detected and reported by the processor, which has the option to recover from them by continuing processing if possible, though the results of such recovery are undefined by the specification. Violations of constraints, such as mismatched start and end tags or invalid character data, are always treated as fatal . Error detection occurs primarily during the phase for checks and, if applicable, during validation for validity constraints. An XML processor must read the document and any parsed entities to verify with syntactic rules, including proper nesting of , correct attribute usage, and valid entity references. For instance, detecting an unescaped (&) in character data or a forbidden name in an triggers immediate error reporting. Encoding errors, such as mismatched byte sequences in the declared , are also and must be reported before further processing. Validating processors additionally check against or DTD constraints, reporting violations like undeclared at the user's option without necessarily halting processing. Recovery from errors is intentionally limited to promote strict adherence to the syntax, distinguishing XML from more forgiving formats like . For fatal errors, processors must terminate normal processing but may continue scanning the input to identify additional errors for comprehensive reporting. To aid error correction, a may provide the application with unprocessed portions of the document, including intermingled character data and markup, allowing users to inspect and fix issues manually. Non-validating processors are not required to report validity errors but must ensure well-formedness in the document entity; if a fatal error is encountered, they cease providing an infoset to the application. This approach ensures reliability in XML processing while minimizing implementation complexity, as extensive recovery mechanisms are not mandated. In practice, common recovery strategies in XML parsers, such as those implemented in libraries like , involve optional error-tolerant modes for non-standard inputs, but these extend beyond the core specification and are not guaranteed to produce valid outputs. For example, upon detecting a fatal error like an abrupt without closing tags, the reports the location and stops, potentially the error position for . This strict error handling underscores XML's design for precise data interchange, where partial recovery could introduce ambiguity.

Validation and Schemas

Document Type Definitions (DTD)

Document Type Definitions (DTDs) provide a formal mechanism for defining the structure and legal content of XML documents, originating from the (SGML) upon which XML is based. A DTD consists of declarations that specify elements, attributes, entities, and notations, enabling validation to ensure documents conform to predefined rules. These declarations can be included in an internal subset directly within the document's DOCTYPE declaration or in an external subset referenced via a system identifier, with the internal subset taking precedence if conflicts arise. For instance, an internal DTD might appear as <!DOCTYPE root-element [<!ELEMENT root-element (#PCDATA)>]>, while an external one uses <!DOCTYPE root-element SYSTEM "example.dtd">. Element declarations in a DTD define the permissible content for each element type using the syntax <!ELEMENT name content-spec>. The content specification outlines the structure, such as requiring specific child elements or allowing parsed character data. Common examples include <!ELEMENT book (title, author)>, which mandates a sequence of title followed by author elements. Content models support various operators: sequences (comma-separated, e.g., (a, b) for a followed by b), choices (pipe-separated, e.g., (p | list) for either p or list), and repetitions ( * for zero or more, plus + for one or more, ? for zero or one). Additionally, ANY permits any well-formed content, as in <!ELEMENT section ANY>, while EMPTY specifies no content, suitable for elements like <!ELEMENT br EMPTY>. Attribute list declarations, using <!ATTLIST element-name attribute-name type default>, specify attributes for elements, including their data types and default values. Attribute types range from CDATA for unparsed character data to tokenized types like ID for unique identifiers, IDREF for references to IDs, NMTOKEN for name tokens, and enumerated lists (e.g., (yes|no)). Defaults include #REQUIRED for mandatory attributes, #IMPLIED for optional ones, #FIXED "value" for fixed values, or a specific default value. An example is <!ATTLIST para id ID #REQUIRED style CDATA "normal">, requiring an id attribute while providing a default style. Entities in DTDs facilitate and . General entities, declared as <!ENTITY name "replacement text">, insert text or markup upon reference (e.g., &entity;), including predefined ones like &amp; for &. Parameter entities, using <!ENTITY % name "value">, are restricted to the DTD and enable inclusion of external subsets or reusable declaration blocks, such as <!ENTITY % inclusions SYSTEM "inclusions.dtd"> %inclusions;. This allows DTDs to be composed from multiple files for . Despite their foundational role, DTDs exhibit significant limitations that have contributed to their declining adoption since the introduction of in 2001. They lack support for rich data types beyond basic strings and tokens, restricting validation to structural constraints without semantic checks like numeric ranges or dates. Furthermore, DTDs do not natively handle XML namespaces, complicating validation in documents mixing vocabularies from different sources. As a result, , which addresses these shortcomings with datatype support and namespace-aware declarations, has become the preferred validation language for modern XML applications.

XML Schema

XML Schema, also known as XML Schema Definition (XSD), is a (W3C) recommendation that provides a language for describing the structure, content, and data types of XML documents. It was first published as a W3C Recommendation on 2 May 2001, consisting of two parts: Structures (Part 1) and Datatypes (Part 2), with the second edition incorporating errata and clarifications released on 28 October 2004. An is expressed as an XML document with the root element <schema> in the namespace http://www.w3.org/2001/XMLSchema, typically prefixed as xs:. This allows schemas to leverage XML's own syntax, including namespaces, for defining constraints. A core strength of XML Schema lies in its , which distinguishes between simple types—used for atomic values like strings or numbers without attributes or child elements—and complex types, which permit structured content with attributes and nested elements. Simple types derive from built-in primitives and can be constrained using facets, such as minLength to enforce a minimum string length or pattern to match regular expressions for formats like email addresses. Complex types support derivation by extension, which builds upon a base type by adding elements or attributes, and by restriction, which narrows the base type's possibilities through tighter facets or reduced content models. These mechanisms enable hierarchical and reusable definitions, fostering object-oriented-like modeling in XML validation. Element and attribute declarations form the building blocks of , with <xs:element> specifying an 's name, type (simple or complex), and optional defaults or fixed values, either globally at the schema level or locally within a type definition. Attributes are declared via <xs:attribute>, detailing their type, usage (required, optional, or prohibited), and defaults, often grouped for reuse across types. Namespaces are integral, with the targetNamespace attribute scoping declarations to avoid conflicts, and schemas can or include others for composition. Substitution groups, defined by designating a "head" element, allow any group member to replace the head during validation, supporting flexible content interchange. Validation against an involves processing an instance document to verify its elements, attributes, and values conform to the schema's rules, including type compatibility and content sequencing. The instance references the schema using attributes from the XML Schema Instance namespace (http://www.w3.org/2001/XMLSchema-instance), primarily xsi:schemaLocation to pair a target URI with the schema document's location , or xsi:noNamespaceSchemaLocation for schemaless namespaces. This process extends XML's checks by enforcing semantic constraints like datatype adherence. XML Schema offers significant advantages over Document Type Definitions (DTDs) through its support for strong typing, including primitive datatypes such as xs:integer for arbitrary-precision whole numbers and xs:date for dates in format, which enable validation of lexical forms and value spaces beyond DTDs' rudimentary ID/IDREF or enumerated types. Its arises from namespace-aware imports, reusable global types, and attribute/element groups, allowing schemas to be assembled from multiple files without the syntactic limitations of DTDs. These features underpin tools like XSD validators, which automate in development pipelines. Example Schema for a Person Element The following schema illustrates key concepts by defining a element with a required string attribute, a child element of type string, and an age child element restricted to non-negative integers:
xml
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="person">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="name" type="xs:string"/>
        <xs:element name="age">
          <xs:simpleType>
            <xs:restriction base="xs:integer">
              <xs:minInclusive value="0"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="id" type="xs:string" use="required"/>
    </xs:complexType>
  </xs:element>
</xs:schema>
Here, the complex type uses a sequence compositor for ordered children, the minInclusive facet restricts the age simple type derivation from xs:integer, and the attribute declaration enforces id presence.

Alternative Schema Languages

While (XSD) serves as the primary standard for XML validation, alternative schema languages address specialized needs such as improved readability, rule-based assertions, or modular combinations of validation approaches. These alternatives, including and Schematron, offer distinct advantages for scenarios where XSD's type-centric model proves overly complex or insufficient for . They are particularly valuable in domains requiring flexible patterns or constraints, though their adoption remains niche compared to XSD due to integration challenges. RELAX NG, formalized as the ISO/IEC 19757-2:2008 standard (first edition 2003), defines XML schemas through patterns that describe document structure and content. It supports two syntaxes: a verbose XML form for compatibility with XML tools and a compact, non-XML syntax that enhances human readability. For instance, a simple pattern for a book element might be expressed in compact syntax as element book { element title { text } }, specifying that a book must contain a title element with textual content. This pattern-based approach allows modular definitions via named patterns and grammar interleaving, facilitating reusable schemas without the rigidity of XSD's complex type hierarchies. Schematron, defined in ISO/IEC 19757-3 with its fourth edition released in 2025, provides a rule-based validation language that complements grammar-based schemas by focusing on assertions about XML patterns. Implemented primarily through XSLT pipelines, it evaluates XPath expressions to enforce constraints, generating human-readable reports on failures. A typical assertion might check for required elements, such as <assert test="count(author)>0">Must have at least one author</assert>, which reports an error if no author elements are present. Unlike pattern-matching languages, Schematron excels at validating cross-document relationships, such as ensuring totals match sums or dates follow logical sequences, making it ideal for integrity checks beyond structural syntax. The Document Schema Definition Languages (DSDL) framework, outlined in ISO/IEC 19757-1:2004, enables the integration of multiple schema languages into a single validation suite. For example, it allows combining for structural patterns with Schematron for rule assertions, creating comprehensive validation pipelines for complex documents. This modularity supports scenarios like document processing workflows where grammar validation precedes enforcement. RELAX NG is favored for its concise syntax in use cases emphasizing schema maintainability, such as defining document formats in the Open Document Format (ODF) standard or the (TEI) guidelines. Schematron, meanwhile, targets business rules validation, including e-invoicing compliance and data quality assurance, where it enforces contextual constraints like mandatory fields in financial XML exchanges. By 2025, both languages integrate into modern XML tools; for instance, is supported in editors like XMLmind for schema-driven authoring, while Schematron appears in Experience Manager for content validation and for framework-based rule sharing. In comparisons, proves less verbose than XSD for straightforward content models, though it lacks native support for features like default attribute values. Schematron offers superior expressiveness for non-structural rules but requires additional processing overhead via . Overall, these alternatives see lower adoption due to XSD's dominance in web services and data binding libraries, yet they thrive in specialized applications like publishing and .

Processing and Interfaces

Parsing Models

XML documents are parsed using various models that determine how the structured data is processed and accessed by applications. The primary parsing models include event-based approaches, which process XML sequentially without retaining the entire document in , and tree-based models, which construct a complete hierarchical representation for and manipulation. These models balance efficiency, usage, and flexibility, with choices depending on document size and processing needs. Pull parsing offers an alternative consumer-driven mechanism, bridging some limitations of push-based event models. The (SAX) is an event-based, stream-oriented parsing model that reads XML documents sequentially and notifies applications via callbacks as parsing events occur, such as the start or end of elements, character data, or processing instructions. Developed initially for but adapted to other languages, SAX version 2.0.1 processes XML without building an in-memory tree, making it suitable for handling large files where memory efficiency is critical. In SAX, the parser drives the process by "pushing" events to registered handlers, which implement interfaces to respond to these notifications, allowing applications to extract or transform data on the fly without full document retention. This model's advantages include low and high speed for one-pass processing, though it lacks support for or easy backtracking. For example, in for event handling:
class ContentHandler:
    on_start_element(name, attributes):
        // Handle opening [tag](/page/Tag), e.g., process name and attributes
    
    on_end_element(name):
        // Handle closing [tag](/page/Tag)
    
    on_characters(data):
        // Process text [content](/page/Content)

parser = create_sax_parser()
parser.set_content_handler(ContentHandler())
parser.parse("document.xml")
This illustrates how callbacks manage events without storing the structure. In contrast, the (DOM) employs a tree-based approach that constructs an in-memory representation of the entire XML document as a hierarchy of nodes, enabling and structural modifications. Defined by the W3C as a platform- and language-neutral interface, DOM Level 3 Core (published April 2004) models documents using node types like , Text, and Attribute, with live updates propagating through the tree. Parsers load the full XML into this object model, allowing traversal via methods such as getElementsByTagName or parent-child navigation, which facilitates complex queries and edits but consumes significant memory for large documents. DOM's strengths lie in applications requiring bidirectional access or document transformation, such as dynamic generation. Pull parsing, exemplified by the Streaming API for XML (StAX) in under JSR-173 (finalized March 2004), shifts control to the application by allowing iterative pulling of parsing events from the XML stream, avoiding the callback overhead of push models like . In this consumer-driven model, applications use an iterator-like interface to request the next event (e.g., start element or text) at their pace, enabling precise without a processing stack. StAX processes XML sequentially with minimal memory use, similar to , but offers better efficiency for complex parsing logic by eliminating event dispatching and supporting bidirectional navigation in some implementations. It is particularly advantageous for medium-to-large documents where fine-grained control reduces overhead compared to DOM's full loading or 's unpredictability. Comparisons among these models highlight trade-offs: excels in efficiency for streaming large files with forward-only access, consuming constant memory regardless of size, while DOM provides versatile manipulation at the cost of proportional memory usage. Pull models like StAX combine SAX's low memory with greater developer control, often outperforming in scenarios requiring conditional processing, though they may introduce slight complexity in implementation. approaches, such as using SAX to build partial DOM trees, leverage strengths for specific use cases like validating subsets of large documents. During parsing, all models may encounter errors, triggering mechanisms as defined in XML specifications.

Data Binding and APIs

Data binding in XML refers to the process of mapping XML documents to native programming language objects, such as classes, and vice versa, enabling developers to manipulate XML data as if it were structured code without directly handling raw XML strings or trees. This approach simplifies XML processing by generating schema-derived classes that encapsulate XML structure, allowing for type-safe access and modification of data. For instance, in , the Java Architecture for XML Binding (JAXB) binds XML schemas to Java objects through compilation, unmarshaling XML into content trees for editing and marshaling them back to XML, supporting validation and customization via annotations. Similarly, XMLBeans compiles XML schemas into Java interfaces and classes that provide access to the full XML instance, preserving schema fidelity and enabling in-memory XML manipulation without partial disassembly. These tools reduce and errors associated with manual parsing, making them essential for enterprise applications handling complex XML payloads. Common APIs for XML processing include the (SAX) and the Streaming API for XML (StAX), which facilitate efficient, event-based handling of XML streams. SAX operates as an event-driven, serial-access parser that invokes callback methods as it encounters XML elements, offering low memory usage ideal for large documents in servlets or network applications, but it lacks support for or querying features like due to its forward-only nature. In contrast, StAX, defined in JSR-173, provides a pull-parsing model where developers control event iteration, enabling bidirectional reading and writing of XML streams with less overhead than SAX's push-based callbacks and avoiding the full tree construction of DOM. These APIs build on foundational parsing models by emphasizing stream efficiency, though they require additional layers for object mapping. XML transformation and querying extend data binding through specialized languages that restructure or extract information from XML. XSLT (Extensible Stylesheet Language Transformations) is a declarative language for converting XML documents into other formats, such as , by applying template rules to source trees, allowing filtering, reordering, and addition of content via pattern matching with expressions. For example, an XSLT stylesheet can transform a simple XML expense report into an paragraph displaying the total amount. , an expression language embedded in XSLT and other tools, enables precise querying of XML nodes using path-based syntax, such as /child::para[1] to select the first paragraph child, supporting axes, predicates, and functions for navigation and selection. Complementing these, serves as a functional for XML, akin to SQL but optimized for hierarchical data, using FLWOR expressions (For-Let-Where-Order-Return) to retrieve and transform sequences from XML sources like documents or databases, with features like grouping and error handling for robust data extraction. As of 2025, XML data binding and increasingly integrate with ecosystems through bridges and converters to support hybrid data environments, particularly in legacy-to-modern migrations where XML persists in systems alongside JSON's dominance in services. Tools like JAXB extensions or libraries such as Jackson XML module facilitate seamless bidirectional mapping between XML and JSON, enabling interoperability in and without full redesign. This trend addresses JSON's significant market share in exchanges (over 75% in usage as of 2024) while maintaining XML's role in validated, structured data flows, driven by demands for in cloud-native applications.

XML in Programming Languages

In , XML processing is facilitated through the built-in javax.xml package, which includes APIs for the (DOM) for in-memory tree-based manipulation, the (SAX) for event-based streaming parsing, and the Streaming API for XML (StAX) for pull-based processing of large documents. These APIs enable developers to parse, validate, and transform XML without external dependencies, with StAX particularly suited for performance-critical applications due to its low memory footprint compared to DOM. For data binding, the Java Architecture for XML Binding (JAXB) automates the mapping between XML schemas and Java classes, allowing seamless and deserialization of objects to XML. Python provides native support for XML via the xml.etree.ElementTree module in the , offering a lightweight, tree-based for , creating, and modifying XML documents with methods like parse() for file loading and find() for XPath-like queries. For advanced features such as full support, schema validation, and faster performance through bindings, the third-party lxml library extends ElementTree compatibility while adding capabilities like CSS selectors and error recovery. As of 2025, lxml version 6.0 remains the recommended choice for production use due to its optimizations for large-scale XML handling. In the .NET ecosystem, the System.Xml namespace supplies core classes like XmlDocument for DOM-style loading and editing of entire XML trees, and XmlReader for efficient, forward-only streaming access that minimizes memory usage during parsing. Complementing these, to XML in System.Xml.Linq integrates () syntax for declarative querying and manipulation of XML, such as using XElement to load documents and Elements() to filter nodes, improving code readability over traditional imperative approaches. JavaScript environments handle XML through browser-native APIs like DOMParser for converting XML strings into DOM documents and XMLSerializer for serializing DOM trees back to XML strings, supporting both synchronous and asynchronous parsing in modern engines. In , the xml2js library provides a popular asynchronous parser that converts XML to objects using a callback or Promise-based interface, with options for attribute handling and explicit array conversion for repeated elements. Best practices for XML processing across languages emphasize performance optimizations like preferring streaming parsers (e.g., , StAX, or XmlReader) over tree-based ones (DOM) for documents exceeding several megabytes to avoid excessive memory allocation, and validating inputs against schemas early to catch errors. Security considerations are paramount, particularly preventing XML External Entity (XXE) attacks by disabling external entity resolution and (DTD) processing in parsers—such as setting setFeature("http://apache.org/xml/features/disallow-doctype-decl", true) in Java's or using no_ext_dtd=True in Python's ElementTree—as unpatched parsers remain a vector for data exfiltration in 2025. Libraries should be kept updated, with features like secure defaults in JAXB 4.0 and lxml 6.x mitigating common vulnerabilities.

Applications and Extensions

Common Use Cases

XML serves as a foundational format in web technologies for defining structured content and graphics. , an XML-based reformulation of , enables stricter document validation and compatibility with XML processing tools, facilitating the creation of well-formed web pages that can be parsed as XML. , a format built on XML, allows for scalable, resolution-independent illustrations embedded directly in web documents, supporting interactive and animated content through scripting. For content syndication, and feeds leverage XML to distribute updates from websites, such as news headlines and blog posts, enabling aggregation across platforms via standardized enclosures and metadata. In enterprise environments, XML underpins protocols for interoperable services and document interchange. , a messaging protocol defined in XML, enables the exchange of structured information in web services, often paired with WSDL, an XML description language that specifies service interfaces, operations, and endpoints for automated discovery and invocation. (OOXML), an ECMA and ISO standardized format, uses XML to represent word processing, spreadsheet, and presentation documents, allowing for programmatic manipulation of office files while maintaining with legacy formats. XML is widely employed for configuration files in and data exchange in specialized sectors. The Android application manifest, an XML file named AndroidManifest.xml, declares essential app components such as activities, permissions, and hardware requirements, serving as a central descriptor for building and deploying mobile applications. In , the Maven Project Object Model (POM) is an XML file that defines project dependencies, build configurations, and plugins, streamlining artifact management in Java-based ecosystems. For financial data exchange, FIXML adapts the FIX protocol into an , enabling the structured transmission of trade orders, executions, and market data across global trading systems. As of 2025, XML continues to find applications in emerging domains like the (), where it describes device capabilities, configurations, and in standards such as those from the Open Geospatial Consortium for sensor observations. For legacy system integration, tools like transform XML data to and from , bridging XML-based enterprise archives with modern web APIs without requiring full data migration. A key strength of XML lies in its extensibility, allowing the creation of domain-specific languages (DSLs) tailored to particular fields by defining custom vocabularies while adhering to core XML syntax rules. For instance, extends XML to encode Western , including scores, parts, and notations like notes, measures, and dynamics, facilitating interchange between notation software and analysis tools. XML Namespaces, defined in the 1999 W3C Recommendation "Namespaces in XML 1.0," provide a mechanism for qualifying element and attribute names using prefixes to avoid ambiguities when combining multiple XML vocabularies in a single document. This specification assigns expanded names to elements and attributes, enabling the declaration of namespaces via attributes like xmlns:prefix="[URI](/page/Uri)", which has become essential for modular XML design. The XML Linking Language (XLink) Version 1.1, a 2010 W3C Recommendation, extends XML by allowing elements to create and describe hyperlinks between resources, supporting both simple and extended link models for bidirectional and multi-ended connections. Complementing XLink, the from 2003 defines an addressing system for identifying specific parts of XML documents, such as elements, attributes, or character ranges, using scheme-based pointers for fine-grained navigation. XSL Formatting Objects (XSL-FO) 1.1, a W3C Recommendation from October 2006, specifies an XML vocabulary for describing the layout and formatting of documents, particularly for print and publishing, including , blocks, and inline elements to generate formatted output like PDF. Additional specifications include (Second Edition, 2009), which defines the xml:base attribute for establishing base URIs in XML documents to resolve relative references, similar to HTML's element. Likewise, XML Inclusions (XInclude) Version 1.1 Group Note (July 2016) provides a standard way to include content from external XML files into a host document via the xi:include element, supporting modular document assembly with fallback handling for errors. These specifications enhance XML's interoperability in broader ecosystems. In the semantic web, RDF/XML syntax—updated in the RDF 1.2 Working Draft (as of November 2025)—serializes Resource Description Framework graphs using XML, leveraging namespaces and base URIs for knowledge representation. For web services, the WS-* stack builds on XML, including SOAP Version 1.2 (2007 W3C Recommendation) for messaging envelopes, WSDL Version 2.0 (2007) for service descriptions, and WS-Addressing 1.0 (2006) for endpoint references and message routing. As of , these XML-related specifications remain part of the W3C portfolio under maintenance protocols, following the 2016 closure of the ; updates occur through errata, integration into dependent standards like RDF, and oversight by relevant working groups such as those for RDF and web services.

Evolution and Variants

Major Versions

XML 1.0, first published as a W3C Recommendation on , 1998, serves as the foundational specification for the Extensible , defining a subset of SGML with restrictions on allowable characters to ensure portability and simplicity. Subsequent editions were released in 2000 (2nd), 2002 (3rd), 2006 (4th), and 2008 (5th) to incorporate errata, clarifications, and minor updates while maintaining . It limits legal characters to specific ranges, such as #x20-#xD7FF and #xE000-#xFFFD, excluding certain control characters and compatibility ideographs to maintain compatibility with early versions and existing processors. This version has become the baseline for XML implementations worldwide, supporting and UTF-16 encodings while requiring well-formed documents for processing. XML 1.1, initially released as a W3C Recommendation on February 4, 2004, and revised in a second edition on August 16, 2006, extends XML 1.0 to accommodate evolving standards and international text requirements. Key expansions include support for additional characters, such as the Next Line (NEL) character (#x85) and Unicode line separator (#x2028), as well as ideographic space characters used in East Asian scripts, allowing their inclusion in names and character data where previously restricted. Backward compatibility with XML 1.0 is achieved through an explicit version declaration in the XML (e.g., <?xml version="1.1"?>), enabling processors to recognize and handle the updated rules without altering 1.0 documents. Regarding compatibility, XML 1.0 processors are required to reject documents declared as version 1.1, as they may contain disallowed characters or constructs under 1.0 rules, ensuring no unintended processing of incompatible features. Conversely, XML 1.1 processors must accept and process both 1.0 and 1.1 documents correctly, promoting gradual adoption. No official specification has been published by the W3C, leaving 1.1 as the latest core version. Adoption of XML 1.0 remains overwhelmingly dominant due to its stability and broad tool support. XML 1.1 sees limited but targeted use, primarily in applications involving that benefit from its enhanced character handling for ideographs and line breaks. Notable differences include line-end normalization: XML 1.0 standardizes only carriage return (#xD) and line feed (#xA) sequences to #xA, while XML 1.1 additionally normalizes NEL (#x85) and line separator (#x2028) sequences, addressing variations in international text files but potentially deprecating simpler 1.0 behaviors in mixed environments.

Proposed Extensions and Alternatives

One notable proposal for simplifying XML is MicroXML, introduced by the MicroXML Community Group in 2012 as a subset of XML designed for environments where the full specification is deemed overly complex. MicroXML omits features such as namespaces, document type definitions (DTDs), and external entity references to reduce implementation overhead while maintaining backward compatibility with XML 1.0 for basic parsing. This lightweight variant aims to facilitate easier adoption in resource-constrained applications, like embedded systems, by streamlining the core markup rules to fit within approximately eight pages of specification. Efforts to address XML's verbosity for transmission have led to binary encoding proposals, including the W3C's Efficient XML Interchange () format, standardized as a Recommendation in 2011. provides a compact, schema-informed representation of XML infosets, achieving compression ratios often superior to gzipped XML—up to 15 times smaller in some evaluations—while supporting fast processing for resource-limited devices. Complementing this, Abstract Syntax Notation One () has been explored as a encoding mechanism for XML , leveraging its packed encoding rules (PER) to serialize XML infosets into efficient streams without proprietary formats. For instance, specifications enable to represent XML structures canonically, facilitating in protocols. The W3C has not pursued an XML 2.0 release, prioritizing the stability of XML 1.0 and 1.1 amid the rise of lighter alternatives like , which gained prominence in the 2010s for web due to its simplicity and native integration. In 2025, XML continues to coexist with and , where dominates for lightweight data exchange in web services and excels in human-readable configurations, though XML persists in domains requiring robust validation like enterprise documents. Hybrid tools, such as converters and mappings in ETL pipelines, enable seamless integration between XML and , for example, in BIM workflows using XML for structured metadata and for dynamic updates. Looking ahead, potential W3C updates may focus on enhancing streaming capabilities via extensions to StAX-like and bolstering through refined XML specifications to counter evolving threats.

Criticisms and Limitations

XML has faced criticism primarily for its , which results in larger document sizes compared to more concise formats such as . This redundancy increases storage needs, bandwidth usage during transmission, and input/output demands, particularly challenging for large datasets or resource-constrained devices like embedded systems. The hierarchical structure and strict syntax rules of XML also contribute to higher parsing overhead, making it computationally intensive for applications handling high volumes of data. Generic compression techniques like can mitigate size issues but do not fully address domain-specific inefficiencies. Other limitations include poor support for binary data storage, absence of native array structures, and difficulties in query optimization. While can enforce data types and constraints, the additional complexity of validation processes can further impact performance. In contemporary web and development, XML has been largely replaced by due to the latter's simplicity, faster parsing, and better alignment with ecosystems. Nevertheless, XML continues to be used in scenarios requiring robust document structuring, such as and configuration files where and extensibility are prioritized over compactness.

References

  1. [1]
    Extensible Markup Language (XML) 1.0 (Fifth Edition) - W3C
    Nov 26, 2008 · XML is an application profile or restricted form of SGML, the Standard Generalized Markup Language [ISO 8879]. By construction, XML documents ...Namespaces in XML · Abstract · Review Version · First Edition
  2. [2]
    The World Wide Web Consortium Issues XML 1.0 as a ... - W3C
    Feb 10, 1998 · XML 1.0 is the W3C's first Recommendation for the Extensible Markup Language, a system for defining, validating, and sharing document formats on the Web.
  3. [3]
    XML in 10 points - W3C
    Mar 27, 1999 · XML is a set of rules (you may also think of them as guidelines or conventions) for designing text formats that let you structure your data.1. Xml Is For Structuring... · 5. Xml Is A Family Of... · 9. Xml Is The Basis For Rdf...
  4. [4]
    Standard Generalized Markup Language (SGML). ISO 8879:1986
    SGML was adapted from IBM's Generalized Markup Language (GML), which Charles Goldfarb, Edward Mosher, and Raymond Lorie developed in the 1960s. The term "GML" ...
  5. [5]
    The World Wide Web: Past, Present and Future - W3C
    Tim Berners-Lee. August 1996. The author is the Director of the World Wide Web Consortium and a principal research scientist at the Laboratory for Computer ...
  6. [6]
    Extensible Markup Language (XML) 1.0 - W3C
    Feb 10, 1998 · The Extensible Markup Language (XML) is a subset of SGML that is completely described in this document. Its goal is to enable generic SGML to be ...
  7. [7]
    Namespaces in XML - W3C
    Jan 14, 1999 · An XML namespace is a collection of names, identified by a URI reference [RFC2396], which are used in XML documents as element types and attribute names.Declaring Namespaces · Namespace Scoping · Namespace Defaulting
  8. [8]
    XHTML 1.0: The Extensible HyperText Markup Language - W3C
    This specification defines XHTML 1.0, a reformulation of HTML 4 as an XML 1.0 application, and three DTDs corresponding to the ones defined by HTML 4.
  9. [9]
    Simple Object Access Protocol (SOAP) 1.1 - W3C
    May 8, 2000 · SOAP is a lightweight protocol for exchange of information in a decentralized, distributed environment. It is an XML based protocol that consists of three ...
  10. [10]
    XML Schema - W3C
    XML Schema 1.0 was approved as a W3C Recommendation on 2 May 2001 and a second edition incorporating many errata was published on 28 October 2004; see reference ...
  11. [11]
    Extensible Markup Language (XML)
    ### Summary of XML Maintenance Status by W3C as of 2025
  12. [12]
  13. [13]
  14. [14]
  15. [15]
  16. [16]
  17. [17]
  18. [18]
  19. [19]
  20. [20]
  21. [21]
  22. [22]
  23. [23]
  24. [24]
  25. [25]
  26. [26]
  27. [27]
  28. [28]
  29. [29]
  30. [30]
  31. [31]
  32. [32]
  33. [33]
  34. [34]
  35. [35]
  36. [36]
  37. [37]
  38. [38]
  39. [39]
  40. [40]
  41. [41]
    Unicode in XML and other Markup Languages
    ### Summary of Unicode Support in XML
  42. [42]
  43. [43]
  44. [44]
  45. [45]
    Usage statistics of character encodings for websites - W3Techs
    UTF-8 is used by 98.8% of all the websites whose character encoding we know. UTF-8. 98.8%. ISO-8859-1. 1.0%. Windows-1252. 0.3%. Windows-1251. 0.2%. EUC-JP ...Missing: caniuse. | Show results with:caniuse.
  46. [46]
  47. [47]
  48. [48]
  49. [49]
  50. [50]
  51. [51]
    xmllint - GNOME
    It prints various types of output, depending upon the options selected. It is useful for detecting errors both in XML code and in the XML parser itself.
  52. [52]
  53. [53]
  54. [54]
  55. [55]
  56. [56]
  57. [57]
  58. [58]
  59. [59]
    XML Schema Part 0: Primer Second Edition - W3C
    Oct 28, 2004 · XML Schema Part 0: Primer is a non-normative document intended to provide an easily readable description of the XML Schema facilities.Missing: decline | Show results with:decline
  60. [60]
    Doing Better than W3C XML Schemas - RELAX NG - Gnosis Software
    RELAX NG Schemas provide a more powerful, more concise, and semantically more straightforward means of describing classes of valid XML instances than do W3C ...Missing: 2025 | Show results with:2025
  61. [61]
    RELAX NG home page
    Feb 25, 2014 · Definitive specification for RELAX NG using the XML syntax. ISO/IEC 19757-2:2003 Document Schema Definition Language (DSDL) -- Part 2 ...Tutorial · Compact Syntax · The Design of RELAX NG · Specification
  62. [62]
    ISO/IEC 19757-2:2008 - Information technology — Document ...
    2–5 day deliveryISO/IEC 19757-2:2008 specifies RELAX NG, a schema language for XML. A RELAX NG schema specifies a pattern for the structure and content of an XML document.<|separator|>
  63. [63]
    RELAX NG Tutorial
    ### RELAX NG Compact Syntax Example for Element Book with Title
  64. [64]
    RELAX NG Specification
    Dec 3, 2001 · A RELAX NG schema specifies a pattern for the structure and content of an XML document. A RELAX NG schema is itself an XML document.Missing: ISO 2003
  65. [65]
    Schematron | Schematron
    Schematron is used for data integrity checking, business rules validation, data reporting, general validation, quality control, quality assurance ...Implementation · Converting Schematron to... · Schematron reimagined for... · News
  66. [66]
    [PDF] NEMSIS V3 Schematron Guide
    Schematron is a rule-based language for XML document validation. Schematron is an international standard defined in ISO/IEC 19757-3(2006) (hereafter ...
  67. [67]
    [PDF] ISO/IEC 19757-3:2020 - iTeh Standards
    May 5, 2020 · Annex D provides an ISO/IEC 19757-2 (RELAX NG compact syntax) schema and corresponding ISO Schematron schema for a simple XML language ...
  68. [68]
    What is Schematron? Enforcing business rules on the DBNAlliance ...
    Oct 14, 2025 · Schematron is used to validate XML-based business documents like e-invoices, ensuring they meet both structural and contextual business rules ...Missing: cases | Show results with:cases
  69. [69]
    [PDF] XMLmind XML Editor - Support of RELAX NG Schemas
    Oct 8, 2025 · The relaxng configuration element specifies the location of the RELAX NG schema (XML syntax or compact syntax) to which conforms the document ...Missing: comparison adoption
  70. [70]
    Support for Schematron files | Adobe Experience Manager
    Feb 7, 2025 · “Schematron” refers to a rule-based validation language used to define tests for an XML file. The Editor supports Schematron files.Missing: business | Show results with:business
  71. [71]
    Integrating Schematron Rules in a Framework and Sharing Them
    Once you define the Schematron rules, they can be shared with the other members of your team by integrating them in a framework (document type) configuration.
  72. [72]
    Top 10 XML Editors Tools in 2025: Features, Pros, Cons ... - Cotocus
    Jul 24, 2025 · Key Features: Intelligent content completion for faster coding. Supports XML Schema, DTD, Relax NG, and Schematron validation. Built-in XSLT and ...
  73. [73]
    SAX
    ### Summary of SAX Parsing Model
  74. [74]
    Lesson: Simple API for XML
    This lesson focuses on the Simple API for XML (SAX), an event-driven, serial-access mechanism for accessing XML documents.
  75. [75]
    Document Object Model Core
    Summary of each segment:
  76. [76]
  77. [77]
    java.xml (Java SE 21 & JDK 21) - Oracle Help Center
    Provides the classes for processing XML documents with a SAX (Simple API for XML) parser or a DOM (Document Object Model) Document builder. javax.xml.stream.
  78. [78]
    Java Architecture for XML Binding (JAXB)
    The Java Architecture for XML Binding (JAXB) provides an API and tools that automate the mapping between XML documents and Java objects.
  79. [79]
    xml.etree.ElementTree — The ElementTree XML API — Python 3.14 ...
    ElementTree provides a simple way to build XML documents and write them to files. The ElementTree.write() method serves this purpose. Once created, an Element ...Xml. Etree. Elementtree... · Tutorial · Xpath Support
  80. [80]
    lxml - Processing XML and HTML with Python
    lxml is the most feature-rich and easy-to-use library for processing XML and HTML in the Python language.Installing lxml · Developing with lxml · Parsing XML and HTML with lxml · Lxml API
  81. [81]
    XmlDocument Class (System.Xml) - Microsoft Learn
    Represents an XML document. You can use this class to load, validate, edit, add, and position XML in a document.
  82. [82]
    XmlReader Class (System.Xml) - Microsoft Learn
    XmlReader represents a reader that provides fast, noncached, forward-only access to XML data.
  83. [83]
    Overview - LINQ to XML - .NET - Microsoft Learn
    Sep 15, 2021 · LINQ to XML is a LINQ-enabled, in-memory XML programming interface that enables you to work with XML from within the .NET programming languages.LINQ to XML developers · LINQ to XML is an XML...
  84. [84]
    DOMParser - Web APIs | MDN
    Oct 13, 2025 · The DOMParser interface provides the ability to parse XML or HTML source code from a string into a DOM Document.In This Article · Instance Methods · Examples
  85. [85]
    xml2js - NPM
    Jul 26, 2023 · Simple XML to JavaScript object converter. It supports bi-directional conversion. Uses sax-js and xmlbuilder-js.52 Versions · 2 Dependencies · 10445 Dependents
  86. [86]
    An Introduction to StAX - XML.com
    Sep 17, 2003 · StAX is a fast, potentially extremely fast, straight-forward, memory-thrifty way to loading data from an XML document the structure of which is well known in ...
  87. [87]
    XML External Entity Prevention - OWASP Cheat Sheet Series
    The safest way to prevent XXE is to disable DTDs (External Entities) completely. If not possible, disable external entities and external document type ...Missing: performance | Show results with:performance
  88. [88]
    What is XXE (XML External Entity) | Examples & Prevention - Imperva
    XXE is a security vulnerability in web apps processing XML data, potentially leading to RCE, file access & system interaction.Xxe (xml External Entity) · What Is Xxe (xml External... · Xxe Prevention Best...
  89. [89]
    Jakarta XML Binding
    Data binding thus allows XML-enabled programs to be written at the same conceptual level as the documents they manipulate, rather than at the more primitive ...
  90. [90]
    ECMA-376 - Ecma International
    This Standard defines Office Open XML's vocabularies and document representation and packaging. It also specifies requirements for consumers and producers ...Missing: enterprise SOAP WSDL<|separator|>
  91. [91]
    App manifest overview | App architecture - Android Developers
    Every app project must have an AndroidManifest.xml file, with precisely that name, at the root of the project source set. The manifest file describes ...Missing: Maven | Show results with:Maven
  92. [92]
    MusicXML File Format Family - The Library of Congress
    Sep 6, 2024 · MusicXML is an XML-based format for representing Western musical notation with specifications available both as XML document type definitions ( ...
  93. [93]
    Namespaces in XML 1.0 (Third Edition) - W3C
    Dec 8, 2009 · XML namespaces provide a simple method for qualifying element and attribute names used in Extensible Markup Language documents.
  94. [94]
    XML Linking Language (XLink) Version 1.1 - W3C
    May 6, 2010 · This specification defines the XML Linking Language (XLink), which allows elements to be inserted into XML documents in order to create and describe links ...XLink Markup Design · XLink Attribute Usage Patterns · XLink Element Type...
  95. [95]
    XPointer Framework - W3C
    Mar 25, 2003 · This specification defines the XML Pointer Language (XPointer) Framework, an extensible system for XML addressing that underlies additional XPointer scheme ...Terminology · Conformance · Scheme-Based Pointer · Namespace Binding Context
  96. [96]
    XML Base (Second Edition) - W3C
    Jan 28, 2009 · This document describes a facility, similar to that of HTML BASE, for defining base URIs for parts of XML documents.xml:base Attribute · Granularity of base URI... · Matching URIs with base URIs
  97. [97]
    XML Inclusions (XInclude) Version 1.1 - W3C
    Jul 21, 2016 · This document specifies a processing model and syntax for general purpose inclusion. Inclusion is accomplished by merging a number of XML information sets into ...Introduction · Terminology · Syntax · Processing Model
  98. [98]
    RDF 1.2 XML Syntax - W3C
    Aug 14, 2025 · This document defines an XML syntax for RDF called RDF /XML in terms of Namespaces in XML, the XML Information Set [ XML-INFOSET ] and XML Base [ XMLBASE ].Grammar Notation · Production oldTerms · Production nodeElement
  99. [99]
    SOAP Version 1.2 Part 1: Messaging Framework (Second Edition)
    Apr 27, 2007 · SOAP Version 1.2 is a lightweight protocol intended for exchanging structured information in a decentralized, distributed environment.
  100. [100]
    XML Core Working Group Public Page - W3C
    The XML Core Working Group publishes the formal XML specification, maintains errata, and works on other specifications, but was closed in 2016.Missing: 2025 | Show results with:2025
  101. [101]
    Extensible Markup Language (XML) 1.1 (Second Edition) - W3C
    Aug 16, 2006 · XML is a subset of SGML, designed for web use, describing data objects and the behavior of programs processing them. It is a restricted form of ...Rationale and list of changes... · Well-Formed XML Documents · External Entities
  102. [102]
    XML (Extensible Markup Language) 1.0 - The Library of Congress
    Jun 10, 2025 · The first edition of XML 1.0 became a W3C recommendation in February 1998. See https://www.w3.org/Press/1998/XML10-REC. The second edition, ...
  103. [103]
    MicroXML - W3C
    Sep 11, 2012 · Abstract. MicroXML is a subset of XML intended for use in contexts where full XML is, or is perceived to be, too large and complex.Missing: Revival Initiative 2013
  104. [104]
    Simplifying XML: MicroXML
    Jun 3, 2017 · A community group created MicroXML, a specification that reduces XML, entirely specified, to around 8 pages even while adding a data model.Missing: Revival Initiative 2013
  105. [105]
    Efficient XML Interchange (EXI) Format 1.0 (Second Edition) - W3C
    Feb 11, 2014 · This document is the specification of the Efficient XML Interchange (EXI) format. EXI is a very compact representation for the Extensible Markup ...
  106. [106]
    Efficient XML Interchange Evaluation - W3C
    This document presents the anticipated benefits of the EXI format 1.0 compared to XML and gzipped XML. Additionally, tests for compactness include comparison ...
  107. [107]
    Why using ASN.1 as a binary encoding for XML - ITU
    ​Some benefits of the binary encoding rules associated with ASN.1 for the encoding of an XML document are: The binary format is not proprietary and is ...
  108. [108]
    [PDF] A representation of the XML Information Set based on ASN.1 - W3C
    Aug 11, 2003 · This ASN.1 schema specifies a set of type definitions for serializing a generic XML Infoset using ASN.1 binary encoding rules. This section ...<|separator|>
  109. [109]
    XML vs the Web - James Clark's Random Thoughts
    Nov 24, 2010 · Twitter and Foursquare recently removed XML support from their Web APIs, and now support only JSON. This prompted Norman Walsh to write an ...
  110. [110]
    MicroXML: The future of XML? - SD Times
    Jul 5, 2012 · XML is an extremely successful technology, but it has flaws that some say could be fixed by MicroXML, a simpler, backward-compatible specification of XML.Missing: Revival Initiative
  111. [111]
    JSON, YAML, TOML, or XML? The Best Choice for 2025 - Leapcell
    Mar 7, 2025 · JSON, YAML, TOML, and XML, as commonly used data formats, each possess unique characteristics and are suitable for different application scenarios.Missing: hybrid | Show results with:hybrid
  112. [112]
    XML vs JSON in BIM Data Exchange
    Jul 11, 2025 · For BIM workflows, a hybrid approach often works best – XML for core data and JSON for real-time updates. XML in BIM Data Exchange. XML ...
  113. [113]
    The Future of XML - Key Insights into Its Role in Digital Transformation
    Jun 13, 2025 · Utilize XML transformations (XSLT) to transform data from different IoT sources into a unified format. This capability is particularly ...
  114. [114]
    XML Security Working Group Charter - W3C
    The mission of the XML Security Working Group, part of the Security Activity, is to take the next step in developing the XML security specifications.Missing: potential | Show results with:potential