PHP(XMLコンテンツ)ファイルからデータベースからいくつかの値を取得するXML解析アプリを構築しました。それらの値の1つに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
ですか?