which Objective C HTML/XML Parser is better to use for MAC and IOS?

Discussion in 'Mac Programming' started by saleh.hi.62, Jul 25, 2011.

  1. saleh.hi.62 macrumors member

    Joined:
    Jul 25, 2011
    #1
    which Objective C HTML/XML Parser is better to use for MAC and IOS?

    ParseKit

    or

    Hpple
     
  2. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #2
    What about NSXML?
     
  3. saleh.hi.62 thread starter macrumors member

    Joined:
    Jul 25, 2011
    #3
    i want to use xpath query! does it support?
     
  4. holmesf macrumors 6502a

    Joined:
    Sep 30, 2001
    #4
    Last time I checked NSXMLDocument wasn't available in iOS and so Apple's built in classes were really only good for SAX parsing (as opposed to DOM parsing). As a result of this I ended up using GData instead. This was a couple years ago though, so my memory is fuzzy.
     
  5. saleh.hi.62 thread starter macrumors member

    Joined:
    Jul 25, 2011
    #5


    does GData perform the Xpath query well? what i need is more on extracting data from XML/HTML using XPath.

    what can you tell me about GData?
     
  6. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #6
    There is documentation for that. Did you read it?
     
  7. holmesf macrumors 6502a

    Joined:
    Sep 30, 2001
    #7
    According this this article http://www.raywenderlich.com/553/how-to-chose-the-best-xml-parser-for-your-iphone-project GDataXML does support XPath. The article may be of use to you to weigh your alternatives.

    GDataXML uses an interface very similar to NSXMLDocument. It was probably programmed to fill in the missing piece since Apple removed it from iOS. It's built on top of libxml2. Other than that I can't tell you anything that you won't find with a google search.
     
  8. saleh.hi.62 thread starter macrumors member

    Joined:
    Jul 25, 2011
    #8
    thank you so much dude,

    one more question! GDataXML also work with HTML perfectly as it works with XML?
     
  9. holmesf macrumors 6502a

    Joined:
    Sep 30, 2001
    #9
    If you're dealing with pure XHTML (ie, HTML that is also valid XML). I don't know what would happen if you threw typical sloppy HTML at it.
     

Share This Page