简体   繁体   中英

Splitting NSString in IPhone

I create an iPhone application using RSS Feed. I using XMLParsing and get the following result in a String. The parsing string having Html tags. I want to read image tag's src only. How can I read src only from the following String Value?

替代文字

How can I read src content only from that string?

Use an XML parser. Your best options for iPhone are (IMHO):

  1. libxml2
  2. NSXMLParser

I found this... basically use NSRegularExpression class. http://cocoabyss.com/2010/first-step-with-nsregularexpression/

The example there searches exactly what you want: src="..." ;)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM