XMLCoder Documentation

Structure XMLEncoder.​Output​Formatting

public struct OutputFormatting: OptionSet  

The formatting of the output XML data.

%7 XMLEncoder.OutputFormatting XMLEncoder.OutputFormatting OptionSet OptionSet XMLEncoder.OutputFormatting->OptionSet

Member Of

XMLEncoder

XMLEncoder facilitates the encoding of Encodable values into XML.

Conforms To

OptionSet

Initializers

init(raw​Value:​)

public init(rawValue: UInt)  

Creates an OutputFormatting value with the given raw value.

Properties

raw​Value

public let rawValue: UInt

The format's default value.

pretty​Printed

public static let prettyPrinted  

Produce human-readable XML with indented output.

sorted​Keys

public static let sortedKeys  

Produce XML with keys sorted in lexicographic order.

no​Empty​Elements

public static let noEmptyElements  

Produce XML with no short-hand annotation for empty elements, e.g., use <p></p> over </p>