I'm looking to use the Objective-C library saxy to parse some XML into objects, however the method signature is:
+ (id)rootXPath:(NSString *)xpath toMany:(Class)toType nsURI:(NSString *)nsURI; I'm having trouble working out how I'd pass the Class object type as Swift does not seem to work with classes in this way. As a workaround I will probably make the domain model + a wrapper in Objective-C, but would be good to know if there's a way to do it in pure Swift.
I've tried the following, but I get a EXC_BAD_INSTRUCTION:
OXmlElementMapper.rootXPath("/route", toMany: Route.self, nsURI: "") and this which produces a syntax error:
OXmlElementMapper.rootXPath("/route", toMany: Route.Type, nsURI: "")