Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/XMLCoder/Encoder/XMLEncoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ open class XMLEncoder {
/// - throws: An error if any value throws an error during encoding.
open func encode<T: Encodable>(_ value: T,
withRootKey rootKey: String? = nil,
rootAttributes: [String: String]? = nil,
rootAttributes: [(key: String, value: String)]? = nil,
header: XMLHeader? = nil,
doctype: XMLDocumentType? = nil) throws -> Data
{
Expand Down
6 changes: 3 additions & 3 deletions Tests/XMLCoderTests/RootLevetExtraAttributesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ final class RootLevetExtraAttributesTests: XCTestCase {
let policy = Policy(name: "test", initial: "extra root attributes")

let extraRootAttributes = [
"xmlns": "http://www.nrf-arts.org/IXRetail/namespace",
"xmlns:xsd": "http://www.w3.org/2001/XMLSchema",
"xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
("xmlns", "http://www.nrf-arts.org/IXRetail/namespace"),
("xmlns:xsd", "http://www.w3.org/2001/XMLSchema"),
("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"),
]

encoder.keyEncodingStrategy = .lowercased
Expand Down