我收到编译错误
var xmlUrl:NSURL = NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("test", ofType: "xml")) ;
let parser:NSXMLParser = NSXMLParser(contentsOfURL: xmlUrl);
//也
func getXML()->DataVO[]{
parser.shouldProcessNamespaces=false;
parser.shouldReportNamespacePrefixes=false;
parser.delegate=self
parser.parse()
}
//multiple compilation errors below
func parser(parser: NSXMLParser!,didStartElement elementName: String!, namespaceURI namespaceURI String!, qualifiedName qualifiedName: String!, attributes attributeDict: [NSObject : AnyObject]!){
}
我在下面得到错误,即使xmlURL定义在上面一行 /Users/kfamily/Documents/xcode_git/nitniem2/nitniem2/JapjiReader.swift:20:57:' JapjiReader.Type'没有名为' xmlUrl'的成员