您好我试图在swift项目中使用raptureXML。有谁知道如何在swift中调用这个函数?
[rootXML iterate:@"players.player" usingBlock: ^(RXMLElement *e) {
NSLog(@"Player #%@: %@", [e attribute:@"number"], [e child:@"name"].text);
}];
答案 0 :(得分:0)
xmlElement.iterate("players.player", usingBlock: {
e in
print(e.atribute("name"))
});