NSXMLParser doesn't work in 3.0

Discussion in 'iOS Programming' started by pashik, May 24, 2009.

  1. pashik macrumors member

    Joined:
    Jul 16, 2008
    #1
    Hi.

    i noticed strange problem in sdk 3.0.
    When i parse XML (e.g. atom feed) everything works fine in any sdk 2.x but sdk 3.0 doesn't it.

    ok, i took Apple's example SeismicXML and what a surprise - it doesn't work in sdk 3.0 (xml is not parsed too).

    I didn't find any difference in NSXMLParser but any 2.x sdk works fine and 3.0 doesn't.

    If anybody met such problem and how to u solve it?

    i tried to debug and found that 3.0 really stops parsing after getting 1st element. there is root element called "feed" and child elements "entry", "feed" and "entry" have child elements called "id" and "title" and parser stops working after finding 1st occurrence of those elements "id and "title" in "feed" so it doesn't parse "entry" element. But sdk 2.x parse everything fine.
     
  2. fishkorp macrumors 68020

    fishkorp

    Joined:
    Apr 10, 2006
    Location:
    Ellicott City, MD
    #2
    I'm using an NSXMLParser in one of my apps and it builds and runs just fine in 3.0, same as it did in 2.x. I'm parsing custom XML I'm sending it.
     
  3. pashik thread starter macrumors member

    Joined:
    Jul 16, 2008
    #3
    i use xml which is generated with Atom feed on youtube.
    RSS and my custom XML are parsed without problems but xml from youtube has problem.

    by the way Aple example SeismicXML is not parsed too in sdk 3.0
     
  4. fishkorp macrumors 68020

    fishkorp

    Joined:
    Apr 10, 2006
    Location:
    Ellicott City, MD
    #4
    Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A312g Safari/528.16)

    I'm using the GData code from Google to parse YouTube and it works in 3.0. But I need more info then what the basic feed provides, which is why I use GData.
     

Share This Page