Skip to content

Commit

Permalink
Simplified initialization of _XMLElement in `parser(_:didStartEleme…
Browse files Browse the repository at this point in the history
…nt:namespaceURI:qualifiedName:attributes:)`
  • Loading branch information
regexident committed Dec 21, 2018
1 parent 79b2e8f commit 1ad2bb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/XMLCoder/Auxiliaries/XMLStackParser.swift
Expand Up @@ -51,8 +51,8 @@ extension _XMLStackParser: XMLParserDelegate {
}

func parser(_: XMLParser, didStartElement elementName: String, namespaceURI _: String?, qualifiedName _: String?, attributes attributeDict: [String: String] = [:]) {
let node = _XMLElement(key: elementName)
node.attributes = attributeDict
let node = _XMLElement(key: elementName, attributes: attributeDict)

stack.append(node)

currentNode?.children[elementName, default: []].append(node)
Expand Down

0 comments on commit 1ad2bb4

Please sign in to comment.