World Library  
Flag as Inappropriate
Email this Article


Article Id: WHEBN0000326530
Reproduction Date:

Title: Yaml  
Author: World Heritage Encyclopedia
Language: English
Subject: Data Exchange, RAML (software), HTSQL, Ansible (software), Configuration file
Collection: Configuration Files, Data Serialization Formats, Lightweight Markup Languages, Markup Languages
Publisher: World Heritage Encyclopedia


Filename extension .yaml, .yml
Internet media type not registered
Initial release 11 May 2001 (2001-05-11)
Latest release
1.2 (Third Edition)
(1 October 2009 (2009-10-01))
Type of format Data interchange
Open format? Yes
Website .orgyaml

YAML (, rhymes with camel) is a [2] It is available for several programming languages.

YAML is a recursive acronym for "YAML Ain't Markup Language". Early in its development, YAML was said to mean "Yet Another Markup Language",[3] but it was then reinterpreted (backronyming the original acronym) to distinguish its purpose as data-oriented, rather than document markup.


  • Features 1
  • Examples 2
    • Sample document 2.1
  • Language elements 3
    • Basic components of YAML 3.1
      • Lists 3.1.1
      • Associative arrays 3.1.2
      • Block literals 3.1.3
        • Newlines preserved
        • Newlines folded
      • Hierarchical combinations of elements 3.1.4
        • Lists of associative arrays
        • Associative arrays of lists
    • Advanced components of YAML 3.2
      • Structures 3.2.1
        • Repeated nodes
      • Data types 3.2.2
        • Casting data types
        • Other specified data types
        • Extension for user-defined data types
    • Syntax 3.3
  • Comparison to other data structure format languages 4
    • JSON 4.1
    • XML 4.2
    • Indented delimiting 4.3
    • Non-hierarchical data models 4.4
    • Practical considerations 4.5
      • Security 4.5.1
    • Data processing and representation 4.6
  • Implementations 5
    • Pitfalls and implementation defects 5.1
    • Portability 5.2
    • C libraries 5.3
    • C++ library 5.4
    • Bindings 5.5
  • See also 6
  • Notes and references 7
  • External links 8


YAML syntax was designed to be easily mapped to data types common to most high-level languages: list, associative array, and scalar.[4] Its familiar indented outline and lean appearance make it especially suited for tasks where humans are likely to view or edit data structures, such as configuration files, dumping during debugging, and document headers (e.g. the headers found on most e-mails are very close to YAML). Although well-suited for hierarchical data representation, it also has a compact syntax for relational data.[5] Its line and whitespace delimiters make it friendly to ad hoc grep/Python/Perl/Ruby operations. A major part of its accessibility comes from eschewing the use of enclosures such as quotation marks, brackets, braces, and open/close-tags, which can be hard for the human eye to balance in nested hierarchies.


Sample document

Data structure hierarchy is maintained by outline indentation.

receipt:     Oz-Ware Purchase Invoice
date:        2012-08-06
    given:   Dorothy
    family:  Gale

    - part_no:   A4786
      descrip:   Water Bucket (Filled)
      price:     1.47
      quantity:  4

    - part_no:   E1628
      descrip:   High Heeled "Ruby" Slippers
      size:      8
      price:     133.7
      quantity:  1

bill-to:  &id001
    street: |
            123 Tornado Alley
            Suite 16
    city:   East Centerville
    state:  KS

ship-to:  *id001

specialDelivery:  >
    Follow the Yellow Brick
    Road to the Emerald City.
    Pay no attention to the
    man behind the curtain.

Notice that strings do not require enclosure in quotations. The specific number of spaces in the indentation is unimportant as long as parallel elements have the same left justification and the hierarchically nested elements are indented further. This sample document defines an associative array with 7 top level keys: one of the keys, "items", contains a 2-element array (or "list"), each element of which is itself an associative array with differing keys. Relational data and redundancy removal are displayed: the "ship-to" associative array content is copied from the "bill-to" associative array's content as indicated by the anchor (&) and reference (*) labels. Optional blank lines can be added for readability. Multiple documents can exist in a single file/stream and are separated by "---". An optional "..." can be used at the end of a file (useful for signaling an end in streamed communications without closing the pipe).

Language elements

Basic components of YAML

YAML offers an "in-line" style for denoting associative arrays and lists. Here is a sample of the components.


Conventional block format uses a hyphen+space to begin a new item in list.

 --- # Favorite movies
 - Casablanca
 - North by Northwest
 - The Man Who Wasn't There

Optional inline format is delimited by comma+space and enclosed in brackets (similar to JSON).[6]

 --- # Shopping list
 [milk, pumpkin pie, eggs, juice]

Associative arrays

Keys are separated from values by a colon+space. Indented Blocks, common in YAML data files, use indentation and new lines to separate the key: value pairs. Inline Blocks, common in YAML data streams, use comma+space to separate the key: value pairs between braces.

 --- # Indented Block
   name: John Smith
   age: 33
 --- # Inline Block
 {name: John Smith, age: 33}

Block literals

Strings do not require quotation. There are two ways to write multi-line strings, one preserving newlines (using the | character) and one that folds the newlines (using the > character), both followed by a newline character.

Newlines preserved
data: |
   There once was a short man from Ealing
   Who got on a bus to Darjeeling
       It said on the door
       "Please don't spit on the floor"
   So he carefully spat on the ceiling

By default, the leading indent (of the first line) and trailing white space is stripped, though other behavior can be explicitly specified.

Newlines folded
data: >
   Wrapped text
   will be folded
   into a single
   Blank lines  denote
   paragraph breaks

Folded text converts newlines to spaces and removes leading whitespace.

Hierarchical combinations of elements

Lists of associative arrays
- {name: John Smith, age: 33}
- name: Mary Smith
  age: 27
Associative arrays of lists
men: [John Smith, Bill Jones]
  - Mary Smith
  - Susan Williams

Advanced components of YAML

Two features that distinguish YAML from the capabilities of other data serialization languages are Structures[7] and Data Typing.


YAML structures enable storage of multiple documents within single file, usage of references for repeated nodes, and usage of arbitrary nodes as keys.[7]

Repeated nodes

For clarity, compactness, and avoiding data entry errors, YAML provides node anchors (using &) and references (using *). References to the anchor work for all data types (see the ship-to reference in the example above).

Below is an example of a queue in an instrument sequencer in which two steps are reused repeatedly without being fully described each time.

# sequencer protocols for Laser eye surgery
- step:  &id001                  # defines anchor label &id001
    instrument:      Lasik 2000
    pulseEnergy:     5.4
    pulseDuration:   12
    repetition:      1000
    spotSize:        1mm

- step: &id002
    instrument:      Lasik 2000
    pulseEnergy:     5.0
    pulseDuration:   10
    repetition:      500
    spotSize:        2mm

- step: *id001                   # refers to the first step (with anchor &id001)
- step: *id002                   # refers to the second step
- step: *id001
    spotSize: 2mm             # redefines just this key, refers rest from &id001
- step: *id002

Data types

Explicit data typing is seldom seen in the majority of YAML documents since YAML autodetects simple types. Data types can be divided into three categories: core, defined, and user-defined. Core are ones expected to exist in any parser (e.g. floats, ints, strings, lists, maps, ...). Many more advanced data types, such as binary data, are defined in the YAML specification but not supported in all implementations. Finally YAML defines a way to extend the data type definitions locally to accommodate user-defined classes, structures or primitives (e.g. quad-precision floats).

Casting data types

YAML autodetects the datatype of the entity. Sometimes one wants to cast the datatype explicitly. The most common situation is a single word string that looks like a number, boolean or tag may need disambiguation by surrounding it with quotes or use of an explicit datatype tag.

a: 123                     # an integer
b: "123"                   # a string, disambiguated by quotes
c: 123.0                   # a float
d: !!float 123             # also a float via explicit data type prefixed by (!!)
e: !!str 123               # a string, disambiguated by explicit type
f: !!str Yes               # a string via explicit type
g: Yes                     # a boolean True (yaml1.1), string "Yes" (yaml1.2)
h: Yes we have No bananas  # a string, "Yes" and "No" disambiguated by context.
Other specified data types

Not every implementation of YAML has every specification-defined data type. These built-in types use a double exclamation sigil prefix ( !! ). Particularly interesting ones not shown here are sets, ordered maps, timestamps, and hexadecimal. Here's an example of base64 encoded binary data.

 picture: !!binary |
Extension for user-defined data types

Many implementations of YAML can support user defined data types. This is a good way to serialize an object. Local data types are not universal data types but are defined in the application using the YAML parser library. Local data types use a single exclamation mark ( ! ).

myObject:  !myClass { name: Joe, age: 15 }


A compact cheat sheet as well as a full specification are available at the official site.[8] The following is a synopsis of the basic elements.

  • YAML streams are encoded using the set of printable Unicode characters, either in UTF-8 or UTF-16. For JSON compatibility, the UTF-32 encodings must also be supported in input.
  • Whitespace indentation is used to denote structure; however tab characters are never allowed as indentation.
  • Comments begin with the number sign ( # ), can start anywhere on a line and continue until the end of the line. Comments must be separated from other tokens by white space characters.[9] Unless they appear inside of a string, then they are number ( # ) sign literals.
  • List members are denoted by a leading hyphen ( - ) with one member per line, or enclosed in square brackets ( [ ] ) and separated by comma space ( ,   ).
  • Associative arrays are represented using the colon space ( :   ) in the form key: value, either one per line or enclosed in curly braces ( {   } ) and separated by comma space ( ,   ).
    • An associative array key may be prefixed with a question mark ( ? ) to allow for liberal multi-word keys to be represented unambiguously.
  • Strings (scalars) are ordinarily unquoted, but may be enclosed in double-quotes ( " ), or single-quotes ( ' ).
    • Within double-quotes, special characters may be represented with C-style escape sequences starting with a backslash ( \ ). According to the documentation the only octal escape supported is \0.
  • Block scalars are delimited with indentation with optional modifiers to preserve ( | ) or fold ( > ) newlines.
  • Multiple documents within a single stream are separated by three hyphens ( --- ).
    • Three periods ( ... ) optionally end a document within a stream.
  • Repeated nodes are initially denoted by an ampersand ( & ) and thereafter referenced with an asterisk ( * ).
  • Nodes may be labeled with a type or tag using the exclamation point ( !! ) followed by a string, which can be expanded into a URI.
  • YAML documents in a stream may be preceded by directives composed of a percent sign ( % ) followed by a name and space delimited parameters. Two directives are defined in YAML 1.1:
    • The %YAML directive is used to identify the version of YAML in a given document.
    • The %TAG directive is used as a shortcut for URI prefixes. These shortcuts may then be used in node type tags.

YAML requires that colons and commas used as list separators be followed by a space so that scalar values containing embedded punctuation (such as 5,280 or can generally be represented without needing to be enclosed in quotes.

Two additional sigil characters are reserved in YAML for possible future standardisation: the at sign ( @ ) and accent grave ( ` ).

Comparison to other data structure format languages

While YAML shares similarities with JSON and XML, it also has characteristics that are unique in comparison to many other similar format languages.


JSON syntax is a basis of YAML version 1.2, which was promulgated with the express purpose of bringing YAML "into compliance with JSON as an official subset".[10] Though prior versions of YAML were not strictly compatible,[11] the discrepancies were rarely noticeable, and most JSON documents can be parsed by some YAML parsers such as Syck.[12] This is because JSON's semantic structure is equivalent to the optional "inline-style" of writing YAML. While extended hierarchies can be written in inline-style like JSON, this is not a recommended YAML style except when it aids clarity.

YAML has many additional features lacking in JSON, including comments, extensible data types, relational anchors, strings without quotation marks, and mapping types preserving key order.


YAML lacks the notion of tag attributes that are found in XML, tag attributes are, arguably, a feature of questionable utility, since the separation of data and meta-data adds complexity when represented by the natural data structures (associative arrays, lists) in common languages.[13] Instead YAML has extensible type declarations (including class types for objects).

YAML itself does not have XML's language-defined document schema descriptors that allow, for example, a document to self-validate. However, there are several externally defined schema descriptor languages for YAML (e.g. Doctrine, Kwalify and Rx) that fulfill that role. Moreover, the semantics provided by YAML's language-defined type declarations in the YAML document itself frequently relaxes the need for a validator in simple, common situations. Additionally, YAXML, which represents YAML data structures in XML, allows XML schema importers and output mechanisms like XSLT to be applied to YAML.

Indented delimiting

Because YAML primarily relies on outline indentation for structure, it is especially resistant to delimiter collision. YAML's insensitivity to quotes and braces in scalar values means one may embed XML, JSON or even YAML documents inside a YAML document by simply indenting it in a block literal (using | or >):

example: >
        HTML goes into YAML without modification
message: |


"Three is always greater than two, even for large values of two"

--Author Unknown

date: 2007-06-01

YAML may be placed in JSON by quoting and escaping all interior quotes. YAML may be placed in XML by escaping reserved characters (<, >, &, ', "), and converting whitespace; or by placing it in a CDATA-section.

Non-hierarchical data models

Unlike JSON, which can only represent data in a hierarchical model with each child node having a single parent, YAML also offers a simple relational scheme that allows repeats of identical data to be referenced from two or more points in the tree rather than entered redundantly at those points. This is similar to the facility IDREF built into XML.[14] The YAML parser then expands these references into the fully populated data structures they imply when read in, so whatever program is using the parser does not have to be aware of a relational encoding model, unlike XML processors, which do not expand references. This expansion can enhance readability while reducing data entry errors in configuration files or processing protocols where many parameters remain the same in a sequential series of records while only a few vary. An example being that "ship-to" and "bill-to" records in an invoice are nearly always the same data.

Practical considerations

YAML is line-oriented and thus it is often simple to convert the unstructured output of existing programs into YAML format while having them retain much of the look of the original document. Because there are no closing tags, braces, or quotation marks to balance, it is generally easy to generate well-formed YAML directly from distributed print statements within unsophisticated programs. Likewise, the whitespace delimiters facilitate quick-and-dirty filtering of YAML files using the line-oriented commands in grep, awk, perl, ruby, and python.

In particular, unlike mark-up languages, chunks of consecutive YAML lines tend to be well-formed YAML documents themselves. This makes it very easy to write parsers that do not have to process a document in its entirety (e.g. balancing opening and closing tags and navigating quoted and escaped characters) before they begin extracting specific records within. This property is particularly expedient when iterating in a single, stateless pass, over records in a file whose entire data structure is too large to hold in memory, or for which reconstituting the entire structure to extract one item would be prohibitively expensive.

Counterintuitively, although its indented delimiting might seem to complicate deeply nested hierarchies, YAML handles indents as small as a single space, and this may achieve better compression than markup languages. Additionally, extremely deep indentation can be avoided entirely by either: 1) reverting to "inline style" (i.e. JSON-like format) without the indentation; or 2) using relational anchors to unwind the hierarchy to a flat form that the YAML parser will transparently reconstitute into the full data structure.


YAML is purely a data representation language and thus has no executable commands.[15] This means that parsers will be (or at least should be) safe to apply to tainted data without fear of a latent command-injection security hole. For example, because JSON is native JavaScript, it is tempting to use the JavaScript interpreter itself to evaluate the data structure into existence, leading to command-injection holes when inadequately verified. While validation and safe parsing is inherently possible in any data language, implementation is such a notorious pitfall that YAML's lack of an associated command language may be a relative security benefit.

However, YAML allows language-specific tags so that arbitrary local objects can be created by a parser that supports those tags. Any YAML parser that allows sophisticated object instantiation to be executed opens the potential for an injection attack. Perl parsers that allow loading of objects of arbitrary class create so-called "blessed" values. Using these values may trigger unexpected behavior, e.g. if the class uses overloaded operators. This may lead to execution of arbitrary Perl code.

The situation is similar for Python parsers. According to the PyYAML documentation:[16]

Note that the ability to construct an arbitrary Python object may be dangerous if you receive a YAML document from an untrusted source such as the Internet. The function yaml.safe_load limits this ability to simple Python objects like integers or lists.

Data processing and representation

The XML[17][18] and YAML specifications[19] provide very different logical models for data node representation, processing, and storage.

XML: The primary logical structures in an XML instance document are: 1) element, and 2) attribute.[20] For these primary logical structures, the base XML specification does not define constraints regarding such factors as duplication of elements or the order in which they are allowed to appear.[21] In defining conformance for XML processors, the XML specification generalizes them into two types: 1) validating, and 2) non-validating.[22] The XML specification asserts no detailed definitions for an API, processing model, or data representation model; although several are defined in separate specifications that a user or specification implementer may choose independently. These include the Document Object Model and XQuery.

A richer model for defining valid XML content is the W3C XML Schema standard.[23] This allows for full specification of valid XML content and is supported by a wide range of open-source, free and commercial processors and libraries.

YAML: The primary logical structures in a YAML instance document[24] are: 1) scalar, 2) sequence, and 3) mapping.[25] The YAML specification also indicates some basic constraints that apply to these primary logical structures. For example, according to the specification, mapping keys do not have an order. In every case where node order is significant, a sequence must be used.[26]

Moreover, in defining conformance for YAML processors, the YAML specification defines two primary operations: 1) dump; and 2) load. All YAML-compliant processors must provide at least one of these operations, and may optionally provide both.[27] Finally, the YAML specification defines an information model or "representation graph", which must be created during processing for both dump and load operations, although this representation need not be made available to the user through an API.[28]


Pitfalls and implementation defects

  • An editor mode that autoexpands tabs to spaces and displays text in a fixed-width font is recommended. Tab expansion mismatch is a pitfall when pasting text copied from Web pages.
  • The editor needs to handle UTF-8 and UTF-16 correctly (otherwise, it will be necessary to use only ASCII as a subset of UTF-8).
YAML allows one to avoid quoted strings, which can enhance readability and avoid the need for nested escape sequences. However, this leads to a pitfall when inline strings are ambiguous single words (e.g. digits or boolean words) or when the unquoted phrase accidentally contains a YAML construct (e.g., a leading exclamation point or a colon-space after a word: "! indicates negation" or "Caution: lions ahead!"). This is not an issue that anyone using a proper YAML emitter will confront, but can come up in ad hoc scripts or human editing of files. In such a case a better approach is to use block literals ( | or > ) rather than inline string expressions as these have no such ambiguities to resolve.
Anticipating implementation idiosyncrasies
Some implementations of YAML, such as Perl's, will load an entire file (stream) and parse it en-masse. Conversely, YAML::Tiny only reads the first document in the stream and stops. Other implementations like PyYaml are lazy and iterate over the next document only upon request. For very large files in which one plans to handle the documents independently, instantiating the entire file before processing may be prohibitive. Thus in, occasionally one must chunk a file into documents and parse those individually. Fortunately, YAML makes this easy since this simply requires splitting on the document separator, which is m/^---$/ (once whitespace is stripped) as a regular expression in Perl.


Simple YAML files (e.g. key value pairs) are readily parsed with regular expressions without resort to a formal YAML parser. YAML emitters and parsers for many popular languages written in the pure native language itself exist, making it portable in a self-contained manner. Bindings to C-libraries also exist when speed is needed.

C libraries

  • LibYAML - As of June 2007, this implementation of YAML 1.1 is stable and recommended by the YAML specification authors[29] for production use (despite the 0.1.4 version number and a mild caution that the API is not barred from evolution.). There is a tutorial on its use. This implementation is available under the MIT license.
  • SYCK - This implementation supports most of YAML 1.0 specification and is in widespread use. It is optimized for use with higher level interpreted languages, obtaining speed by writing directly to the symbol table of the higher level language when it can. As of 2005 it is no longer maintained but remains available. This implementation is available under the user's choice of two licenses; the 2-clause BSD license, and an unusual "Death and Repudiation" license, which restricts its use to dead people only.

C++ library

  • yaml-cpp C++ Yaml library, compatible with YAML 1.2 spec


Native implementations and C libraries bindings for YAML exist for the following languages:

as3yaml a direct port of jvyaml for Actionscript 3
YamlDotNet provides low level parsing and emitting of YAML as well as a high level object model similar to XmlDocument
YAML Library for .NET (C#)
YAML Parser in C# an almost feature complete YAML Parser written in C#
YAML for .NET, Visual Studio and Powershell
yaml Parser for YAML (Dart Library)
FsYaml Typed YAML Library for F#
yamler based on LibYAML, load only
yaml Pure Go implementation of LibYAML, developed within Canonical
goyaml based on LibYAML but written entirely in Go
YamlReference implementation of YAML syntax and utilities
yaml binding to LibYAML
HsSyck interface to SYCK
json2yaml conversion
jvyaml based on Syck API, and patterned off RbYAML
JYaml pure small Java implementation
SnakeYAML YAML 1.1 parser and emitter for Java 5
JS-YAML full-featured YAML 1.2 parser and emitter written entirely in JavaScript
CommonJS js-yaml, covers a small subset of YAML
jsyaml code on stackoverflow
  • YAML.jl – parses YAML documents into native Julia types[30]
yaml LibYAML binding
YAML.framework based on recommended LibYAML
YAMLKit wrapper for LibYAML
YAML, a common interface to several YAML parsers
YAML::Tiny implements a useful subset of YAML; small, pure Perl, and faster than the full implementation.
YAML::Syck Binding to SYCK C-library. Offers fast, highly featured YAML.
YAML::XS Binding to LibYaml. Better YAML 1.1 compatibility.
YAML::Any Detect the best available YAML implementation and wrap that with the standard YAML API.
Spyc, a pure PHP implementation
PHP-Syck (binding to SYCK library)
Symfony YAML Component was initially released as part of the Symfony framework.
PECL Yaml (binding to LibYAML library)
PyYAML Highly featured. Pure Python or optionally uses LibYAML.
ruamel.yaml Enhancement of PyYAML (round-trip preservation of comments/collection style/mapping key order and other improvements)
PySyck - binding to SYCK C-Library
(YAML included in standard library since 1.8. based on SYCK)
Ya2YAML with full UTF-8 support
ZAML far faster than default library
RbYAML - a YAML parser in pure Ruby
CRAN YAML (binding to LibYAML library)
Available as of Tcl 8.4
YAXML (currently draft only)

See also

Notes and references

  1. ^ Evans, Clark (May 11, 2001). "YAML Draft 0.1". Yahoo! Tech groups: sml-dev. Retrieved 2008-08-02. 
  2. ^ a b "YAML Ain't Markup Language: About". Retrieved 2010-06-16. 
  3. ^ "Yet Another Markup Language (YAML) 1.0". Retrieved 2008-11-24. 
  4. ^ For purposes of this article, the terms (list and array), (associative array, hash, dictionary and mapping) and (string and scalar) are used interchangeably. Such usage is a simplification and may not be correct when specifically applied to some programming languages.
  5. ^ A hierarchical model only gives a fixed, monolithic view of the tree structure. For example, either actors under movies, or movies under actors. YAML allows both using a relational model.
  6. ^
  7. ^ a b "YAML 1.2 specification of Structures". Retrieved 22 April 2014. 
  8. ^ "Reference Card". Retrieved March 21, 2014. 
  9. ^ "YAML Ain’t Markup Language (YAML™) Version 1.2". Retrieved 27 May 2015. 
  10. ^ "YAML Ain’t Markup Language (YAML™) Version 1.2". Retrieved 27 May 2015. 
  11. ^ The incompatibilities were as follows: JSON allows extended character sets like UTF-32 and had incompatible unicode character escape syntax relative to YAML; YAML required a space after separators like comma, equals, and colon while JSON does not. Some non-standard implementations of JSON extend the grammar to include Javascript's /*...*/ comments. Handling such edge cases may require light pre-processing of the JSON before parsing as in-line YAML. See also [1].
  12. ^ Parsing JSON with SYCK. Note that e.g. Symfony's YAML parser does not support line breaks inside [] or {} structures, which is a major incompatibility with JSON.
  13. ^ In Markup Languages, attribute values in an open-tag must be handled separately from the data value enclosed by the tags. Typically, to hold this in a data structure means each node is an object with storage for the tag-name plus an associative array for any possible named attributes and their values, and then a separate scalar for holding any enclosed data. YAML treats these even-handedly: each node is simple type, usually a scalar, list, or associative array.
  14. ^ "Extensible Markup Language (XML) 1.0 (Second Edition)". Retrieved 27 May 2015. 
  15. ^ A proposed "yield" tag will allow for simple arithmetic calculation.
  16. ^ "PyYAML Documentation, Loading YAML". Retrieved 20 Nov 2012. 
  17. ^ "Extensible Markup Language (XML) 1.0 (Fourth Edition)". Retrieved 2007-11-04. 
  18. ^ "Extensible Markup Language (XML) 1.1 (Second Edition)". Retrieved 2007-11-04. 
  19. ^ "YAML Ain't Markup Language (YAML) Version 1.1". Retrieved 2007-11-04. 
  20. ^ "Extensible Markup Language (XML) 1.1 (Second Edition)". Retrieved 27 May 2015. 
  21. ^ Note, however, that the XML specification does define an "Element Content Model" for XML instance documents that include validity constraints. Validity constraints are user-defined and not mandatory for a well-formed XML instance document. In the case of duplicate Element attribute declarations, the first declaration is binding and later declarations are ignored [2].
  22. ^ "Extensible Markup Language (XML) 1.0 (Fifth Edition)". Retrieved 27 May 2015. 
  23. ^>
  24. ^ The YAML specification identifies an instance document as a "Presentation" or "character stream". [3]
  25. ^ Additional, optional-use, logical structures are enumerated in the YAML types repository."Language-Independent Types for YAML Version 1.1". Retrieved 2007-11-04. The tagged types in the YAML types repository are optional and therefore not essential for conformant YAML processors. "The use of these tags is not mandatory."
  26. ^ "YAML Ain't Markup Language (YAML) Version 1.1". Retrieved 27 May 2015. 
  27. ^ "Dump" and "Load" operations consist of a few sub-operations, not of all of which need to be exposed to the user or through an API, (see
  28. ^ "YAML Ain't Markup Language (YAML) Version 1.1". Retrieved 27 May 2015. 
  29. ^ YAML creator Clark Evans inserted this recommendation.
  30. ^ Jones, Daniel. "YAML". Github. Retrieved 19 August 2014. 

External links

  • YAML Quick Reference card
  • YAML Specification
  • YAML improves on XML. Intro to YAML in Python
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.