I am trying to get the value of an attribute in an XML Node in swift. The following is a code example. I don't see any way of getting the value as no properties or methods seem to allow for this.
for word in dictionary.words {
let xpath = "/strongsdictionary/entries/entry[greek[@unicode='" + word.word + "']]/pronunciation"
do {
let xmlnode = try document?.nodes(forXPath: xpath )
// Need to get value of attribute named 'strongs' from the node here.
} catch {
debugPrint("Error finding xpath path.")
break
}
}