我已经构建了一个 XML Parse 应用程序,它从 PHP(XML 内容)文件中检索我的数据库中的一些值,在其中一个值中我有一个 URL,问题是,每次我尝试使用这个 URL 加载 webView没有任何反应!我有以下代码:
-(void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName {
if ( [elementName isEqualToString:@"users"] ) {
[messages addObject:[NSDictionary dictionaryWithObjectsAndKeys:msgIDEN,@"id",msgAdded,@"added",msgUsername,@"username",msgEmail,@"email",msgMainCode,@"maincode",msgPictureAddress,@"userpictureaddress",nil]];
[[messages reverseObjectEnumerator] allObjects];
lastId = msgId;
[msgAdded release];
[msgUsername release];
[msgEmail release];
[msgMainCode release];
[msgPictureAddress release];
NSLog(@"UserData:Success");
NSString *urlAddress = msgPictureAddress;
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webViewMateus loadRequest:requestObj];
}
if ( [elementName isEqualToString:@"id"] ) { inIDEN = NO; }
if ( [elementName isEqualToString:@"username"] ) { inUsername = NO; }
if ( [elementName isEqualToString:@"email"] ) { inEmail = NO; }
if ( [elementName isEqualToString:@"usermaincode"] ) { inMainCode = NO; }
if ( [elementName isEqualToString:@"userpictureaddress"] ) { inPictureAddress = NO; }
}
如何使 UIWebView 地址与我的相同NSMutableString = userpictureaddress
?