Hi.
I'm working on a little app project to make an app for a french Chuck Norris Facts website. I need to parse the HTML files on their website to extract facts. I have found these piece of code to open the file. Seems to work since it shows in my NSLOG.
Code:
NSString *htmlFile=[NSString stringWithContentsOfFile:@"/Path/to/my/htmlfile.html"];
NSLog(@"%@", htmlFile);
Can anybody give me a clue to extract the fats from the HTML file ? Here's it's structure :
Code:
<div class="fact" id="fact6897">Chuck Norris blabla</div>
<div class="fact" id="fact9355">Chuck Norris blablaagain</div>
<div class="fact" id="fact257">Chuck Norris blablablabla</div>
And it goes on. 30 facts per file.