XMLCoder Documentation

Structure Element

@propertyWrapper
public struct Element<Value>: XMLElementProtocol  

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

For example, this type

struct Book: Codable {
    @Element var id: Int
}

will encode value Book(id: 42) as <Book><id>42</id></Book>. And vice versa, it will decode the former into the latter.

%11 Element Element Codable Codable Element->Codable XMLElementProtocol XMLElementProtocol Element->XMLElementProtocol

Conforms To

Codable

Initializers

init(_:​)

public init(_ wrappedValue: Value)  

Properties

wrapped​Value

public var wrappedValue: Value