iphone - to extract a part of the URl after XML parsing? -
I am trying to parse an XML file that has an element named "Details" below: / P> What I need is that tag Part of the parsing is given below Please refer to Arun pre & lt; & Lt ;! [CDATA [& lt; A href = 'http: //www.okmagazine.com/posts/view/13756/'> & Lt; Img src = 'http: //www.okmagazine.com/img/photos/thumbs/27044' / & gt; & Lt; / A & gt; & Lt; Br / & gt; Ashley and Pete took AAA Schwarz in NYC for her small toy. & Lt; P & gt; & Lt; Strong & gt; Pete Vents & lt; / Strong> And & lt; Strong & gt; Ashley Simpson Ventz & lt; / Strong> Today FAO Schwarz of New York made a pilgrimage to the new parents, where 6 months old & lt; Strong & gt; Bronx Mowgli & lt; / Strong> Was ...]] & gt; & Lt; / Description & gt; & lt; Img src = 'http: //www.okmagazine.com/img/photos/thumbs/27044' to get links in; I can display an image in my image view using ... how can I separate this string from the description tag contents?
- (zero) parser: (NSXMLPers *) Parser has been foundDescription: (NSSTING *) string {// NSLog ( @ "Crossed characters:% @", string); // Saving letters for existing items ... if ([present element is extolstring: @ "title"]) {[currentTitle appendString: string]; } And if ([present element is extolstration: @ "link"]) {[currentLink append string: string]; } And if ([Current Element is Elevatostring: @ "Details"]) {[Current Safari Attachment: String]; } And if ([present element is extolstration: @ "pubadet"]) {[current date offsetting: string]; }}
I have never used that exact framework, but what you need to keep in mind is that when you get CDATA, you will be notified, some things inside are only parser Is plain-text It seems that you want to apply, you will pass a NSDT block, and from there you have to parse the content. Now, you can use the second parser to do this, but it is probably faster to do manual substrings.
Comments
Post a Comment