Open williamhqs opened 13 years ago
what if you stripped your string of <br /> beforehand?
I meant to link to: – stringByReplacingOccurrencesOfString:withString: http://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#//apple_ref/occ/instm/NSString/stringByReplacingOccurrencesOfString:withString:
The above possible solution doesn't work.
Dear topFunky, how should i ignore <<br />>? the html file like this: <div class="Fiche"> <p>Every Sunday, our Chef proposes a buffet high in color.<br /> <br /> A brunch <br /> <br /> Every <br /> <br /> Information/ reservations : (377) 98 06 03 60</p>
When i parse the text between<p> and</p>, what i only get is: Information/ reservations : (377) 98 06 03 60. How should i ignore <br />, thanks a lot!
My code: NSArray array4Soustitre = [xpathParser search:@"//div [@class='Fiche']/p"]; TFHppleElement ele= [array4Soustitre objectAtIndex:0]; NSLog(@"content is %@ ",[ele content]);