objects(forXQuery:)
Returns the objects resulting from executing an XQuery query upon the receiver.
Declaration
func objects(forXQuery xquery: String) throws -> [Any]Parameters
- xquery:
A string that expresses an XQuery query.
Discussion
The receiver acts as the context item for the query (”.”). If the receiver has been changed after parsing to have multiple adjacent text nodes, you should invoke the NSXMLElement method normalizeAdjacentTextNodesPreservingCDATA(_:) (with an argument of false) to coalesce the text nodes before querying .This convenience method invokes objects(forXQuery:constants:) with nil for the constants dictionary.