Using NSXMLParser with CDATA

前端 未结 2 1514
说谎
说谎 2020-12-05 16:04

I\'m parsing an RSS feed with NSXMLParser and it\'s working fine for the title and other strings but one of the elements is an image thats like



        
2条回答
  •  生来不讨喜
    2020-12-05 16:43

    The point of CDATA is that anything within it is not treated as part of the XML document. So if you have tags in CDATA the parser will ignore them.

    I'm guessing this CDATA is in the description element. So you'll need to extract the tags from the "description" element, either manually or via another instance of a parser.

提交回复
热议问题