Parsing HTML content

I am parsing the link http://feedproxy.google.com/~r/NDTV-Tech/~3/YNW1kE-FDv0/story01.htm to get the contents from 'HeadContent_FullstoryCtrl_fulldetails' HTML tag. I am using TFHpple and pointing xpath parser to the HTML element using //*[@id='HeadContent_FullstoryCtrl_fulldetails'].

The response of this is in an NSArray which has the output as in below sample. I need to get only 'nodeContent' data so that i can get the news details alone.

<__NSArrayM 0x16d73950>(
{
    nodeAttributeArray =     (
                {
            attributeName = id;
            nodeContent = "HeadContent_FullstoryCtrl_fulldetails";
        },
                {
            attributeName = class;
            nodeContent = description;
        }
    );
    nodeChildArray =     (
                {
            nodeChildArray =             (
                                {
                    nodeContent = "The Lumia 1520 has two big things working against it, neither of \nwhich is a deal-breaker on its own, but when combined, make it a very \ninteresting product to review. First, it's a Windows Phone. While the \nplatform certainly does have its fans, there's no denying that it isn't \nas versatile as iOS and Android yet. As a person buying this phone, you \nwill have to put up with a number of limitations and frustrations \nbecause of its software. Second, it's huge. So-called \"phablets\" are big\n business, but not everybody wants a phone that can't fit in a pocket \nand be held in one hand. With that said, it's time to examine this phone\n on its own merits and see whether Nokia has managed to distinguish \nitself with a winner.";
                    nodeName = text;
                }
            );
            nodeName = p;
            raw = "<p>The Lumia 1520 has two big things working against it, neither of \nwhich is a deal-breaker on its own, but when combined, make it a very \ninteresting product to review. First, it's a Windows Phone. While the \nplatform certainly does have its fans, there's no denying that it isn't \nas versatile as iOS and Android yet. As a person buying this phone, you \nwill have to put up with a number of limitations and frustrations \nbecause of its software. Second, it's huge. So-called \"phablets\" are big\n business, but not everybody wants a phone that can't fit in a pocket \nand be held in one hand. With that said, it's time to examine this phone\n on its own merits and see whether Nokia has managed to distinguish \nitself with a winner.</p>";
        },

Answers


NSXMLParser will handle this for you : https://developer.apple.com/library/mac/documentation/cocoa/reference/foundation/Classes/NSXMLParser_Class/Reference/Reference.html


I am able to read the specific details of an HTML tag with the help of 'zootreeves / Objective-C-HMTL-Parser' https://github.com/zootreeves/Objective-C-HMTL-Parser.

Just wanted to post the answer as it might help others!.


Need Your Help

Java 8 Timer to repeat one function

java timer countdowntimer

How can I implement a timer in Java 8? I prefer one simple method for this. I want to do something every 15 min or 30 min. Any idea?

weblogic setting and javascript

java javascript performance weblogic

I have a web application deployed on weblogic on a UNIX box. The app is also deployed on my local and another older UNIX box with weblogic. On my local and the older machine, the app works just fin...