Skip to content

Commit

Permalink
Readd the deprecated API for defining prefix as we don't want to brea…
Browse files Browse the repository at this point in the history
…k compatibility yet. Will remove in version 4.
  • Loading branch information
cezheng committed May 25, 2019
1 parent fdcdaf7 commit 1977a67
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Sources/Document.swift
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,17 @@ open class XMLDocument {
open func definePrefix(_ prefix: String, forNamespace ns: String) {
namespaces[prefix] = ns
}

/**
Define a prefix for a default namespace.

- parameter prefix: The prefix name
- parameter ns: The default namespace URI that declared in XML Document
*/
@available(*, deprecated, renamed: "definePrefix(_:forNamespace:)", message: "This API will be removed in version 4.")
open func definePrefix(_ prefix: String, defaultNamespace ns: String) {
definePrefix(prefix, forNamespace: ns)
}
}

extension XMLDocument: Equatable {}
Expand Down

0 comments on commit 1977a67

Please sign in to comment.