Análisis de bloques CDATA

i was searched for this and am getting brain fire. i am gettig

<description><![CDATA[<img src='' style='float:left; margin-right:15px;' /><br /> NIL]]></description>

i dont know parse the Particular Link (

even Though i have tried to use

   - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock
         if([sElementName isEqualToString:@"description"])
                   NSMutableString *someString= [[NSMutableString alloc] initWithData:CDATABlock encoding:NSUTF8StringEncoding];


it is get printed like

<img src='' style='float:left; margin-right:15px;' /><br /> NIL

help me to get the particular link. Any links or answer may help.., Thanks in Advance.,

preguntado el 28 de agosto de 12 a las 12:08

1 Respuestas

The CDATA function is exactly for this purpose - if you have some XML that you want to embed into another XML as text (as opposed to as nested XML that modifies the structure itself). So, after obtaining this particular string, the <img> tag, you can use another XML parser to obtain the value of the src atributo.

Respondido 28 ago 12, 12:08

@h203 thanks for the answer.could u please tell me how to obtain the value of the src attribute..,. - Manikandan

@dhanush just as you would do with any other XML parsing. - user529758

@h203 :is there any tutorial is available for this?? Or any links explaining About this Parsing ??? - Manikandan

The contained data is no well formed XML. - Nikolái Ruhe

@NikolaiRuhe no. But it's similar - there are XML-based HTML parser libraries, etc. so no need to downvote. - user529758

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.