Media Type Registry
XML: Extensible markup language
Media Type(s):
• application/xml (IANA) – RFC7303, XML 1.0 (commonly used), XML 1.1 (rarely used), WHATWG DOM
OAS References:
• XML Object
• XML Modeling (Schema Object)
Summary
XML is modeled using the OAS’s xml
extension keyword for JSON Schema, which has an XML Object as its value.
Remarks
As of OAS v3.2, the XML Object uses the nodeType
field to determine the type of interface node to which a given Schema Object corresponds: element
, attribute
, text
, cdata
, or none
. If nodeType
is set to none
, a Schema Object does not correspond to anything and the nodes corresponding to its immediate subschemas are placed directly under the node of its parent schema.
Certain behaviors are retained for compatibility with OAS v3.1, including implicit text nodes for elements with a primitive type, and somewhat complex rules for the default value of nodeType
. In OAS v3.1 and earlier, only elements, their implicit primitive-type text nodes, and attributes were supported, with the now-deprecated attribute
and wrapped
flags as controls.