2

I am new to iphone development.I am able to parse a Xml file at a URL and retrieve it contents from a particular nodes.

For Parsing at url

 NSString * path = @"xxxxxxxxxxxxxxxxxxxxxx";
    [self parseXMLFileAtURL:path];

For retrieving the data i use NSXMLParser .How can i achieve the same thing if i have HTML file at my URL(Source code of the webpage is HTML).Please help me out.Thanks.

1 Answer 1

3

You can't parse HTML with NSXMLParser, unless if you want parse it markup by markup.

However it exists some library to do this like the libxml2. You can find a mini tuto here: How to Parse HTML

You can also find more information about it at another topic: parsing HTML on the iPhone

Sign up to request clarification or add additional context in comments.

1 Comment

The tutorial you gave me a proper idea of approaching my task.I am not able to understand the logic behind the search of h3 tag which has // too

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.