English 中文(简体)
xml parser无法读到xml的所有点
原标题:xml parser not able to read all the nodes of the xml

当时正试图从网络服务中恢复过来的xml所有节点获得价值。 但是,仅仅花在《基本要素》一纸上,它就应当去其他复制件,但只是在那个时候终止,它不会再读。 法典:

-(void)parseData页: 1
NuanceAppDelegate *appDel = (NuanceAppDelegate *)[[UIApplication sharedApplication] delegate];
NSString *url = @"http://cmweb.bpomatrix.net/SmartPhoneService.svc/login/";
url = [[[url stringByAppendingString:UserName] stringByAppendingString:@"/"] stringByAppendingString:Password];
url = [[url stringByAppendingString:@"/"] stringByAppendingString:appDel.CPAID];
NSLog(@"log: @%",url);
NSURL *loginURL = [NSURL URLWithString:url];

NSXMLParser *home_Parser = [[NSXMLParser alloc] initWithContentsOfURL:loginURL];
[home_Parser setDelegate:self];
dict = [[NSMutableDictionary alloc] init];
[home_Parser parse];

iii

- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict

页: 1

if([elementName isEqualToString:@"Address"])
    addressFound = TRUE;
if([elementName isEqualToString:@"Name"])
    nameFound = TRUE;
if([elementName isEqualToString:@"LoyaltyNum"])
    loyaltyNumFound = TRUE;
if([elementName isEqualToString:@"City"])
    cityFound = TRUE;
if([elementName isEqualToString:@"Province"])
    proFound = TRUE;
if([elementName isEqualToString:@"Zip"])
    zipFound = TRUE;
//NSLog(@"Response %@",responseFound);

iii

- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string页: 1
if(addressFound)
页: 1
    [dict setObject:string forKey:@"address"];
    addressFound = FALSE;
iii
else if(nameFound)
页: 1
    [dict setObject:string forKey:@"name"];
    nameFound = FALSE;
iii
else if(loyaltyNumFound)
页: 1
    [dict setObject:string forKey:@"loyaltyNum"];
    loyaltyNumFound = FALSE;
iii
else if(cityFound)
页: 1
    [dict setObject:string forKey:@"city"];
    cityFound = FALSE;
iii
else if(proFound)
页: 1
    [dict setObject:string forKey:@"province"];
    proFound = FALSE;
iii
else if(zipFound)
页: 1
    [dict setObject:string forKey:@"zip"];
    zipFound = FALSE;
iii

iii

 - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
    页: 1
        if([elementName isEqualToString:@"clsUserProfile"])
        页: 1   
            [self parsingOver];
        iii
    iii

    - (void)parsingOver
    页: 1
        NuanceAppDelegate *appDel = (NuanceAppDelegate *)[[UIApplication sharedApplication] delegate];
        appDel.dictProfile = dict;
    iii
最佳回答

发现我的错误,是讽刺的错误,即不适当地进行偷窃

问题回答

暂无回答




相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签