XMLCoder Documentation

Classes

XMLDecoder

XMLDecoder facilitates the decoding of XML into semantic Decodable types.

XMLEncoder

XMLEncoder facilitates the encoding of Encodable values into XML.

Structures

Attribute

Property wrapper specifying that a given property should be encoded and decoded as an XML attribute.

Element

Property wrapper specifying that a given property should be encoded and decoded as an XML element.

Element​And​Attribute

Property wrapper specifying that a given property should be decoded from either an XML element or an XML attribute. When encoding, the value will be present as both an attribute, and an element.

XMLHeader

Type that allows overriding XML header during encoding. Pass a value of this type to the encode function of XMLEncoder to specify the exact value of the header you'd like to see in the encoded data.

XMLEncoder.​Output​Formatting

The formatting of the output XML data.

Enumerations

XMLDecoder.​Date​Decoding​Strategy

The strategy to use for decoding Date values.

XMLDecoder.​Data​Decoding​Strategy

The strategy to use for decoding Data values.

XMLDecoder.​Non​Conforming​Float​Decoding​Strategy

The strategy to use for non-XML-conforming floating-point values (IEEE 754 infinity and NaN).

XMLDecoder.​Key​Decoding​Strategy

The strategy to use for automatically changing the box of keys before decoding.

XMLDecoder.​Node​Decoding

A node's decoding type

XMLDecoder.​Node​Decoding​Strategy

Set of strategies to use for encoding of nodes.

XMLEncoder.​Pretty​Print​Indentation

The indentation to use when XML is pretty-printed.

XMLEncoder.​Node​Encoding

A node's encoding type. Specifies how a node will be encoded.

XMLEncoder.​Date​Encoding​Strategy

The strategy to use for encoding Date values.

XMLEncoder.​String​Encoding​Strategy

The strategy to use for encoding String values.

XMLEncoder.​Data​Encoding​Strategy

The strategy to use for encoding Data values.

XMLEncoder.​Non​Conforming​Float​Encoding​Strategy

The strategy to use for non-XML-conforming floating-point values (IEEE 754 infinity and NaN).

XMLEncoder.​Key​Encoding​Strategy

The strategy to use for automatically changing the value of keys before encoding.

XMLEncoder.​Node​Encoding​Strategy

Set of strategies to use for encoding of nodes.

Protocols

XMLDecodable​Sequence

Type-erased protocol helper for a metatype check in generic decode overload. If you custom sequence type is not decoded correctly, try making it confirm to XMLDecodableSequence. Default conformances for Array and Dictionary are already provided by the XMLCoder library.

XMLChoice​Coding​Key

An empty marker protocol that can be used in place of CodingKey. It must be used when attempting to encode and decode union-type–like enums with associated values to and from XML choice elements.

Dynamic​Node​Decoding

Allows conforming types to specify how its properties will be decoded.

Dynamic​Node​Encoding

Allows conforming types to specify how its properties will be encoded.

Extensions

Array