user4809833
user4809833

Reputation:

Use of undeclared type 'NSXMLElement' error

I searched a lot and found it:

func getAllRegisteredUsers() {
    do {
        var query: NSXMLElement = try NSXMLElement(xMLString: "<query xmlns='http://jabber.org/protocol/disco#items' node='all users'/>")
    } catch { }

    var iq: XMPPIQ = XMPPIQ.iqWithType("get", to: XMPPJID.jidWithString("DOMAIN"), elementID: xmppStream.generateUUID(), child: query)
    xmppStream.sendElement(iq)
}

but it returns me that

Use of undeclared type 'NSXMLElement'

Is there any other ways for getting all users list or how can I fix this error?

Upvotes: 1

Views: 450

Answers (1)

Alexander Kukla
Alexander Kukla

Reputation: 240

You can use DDXMLElement instead.

Upvotes: 2

Related Questions