Monday, 4 January 2016

XML : Replacing html tag in XML string in swift

I want to replace <![CDATA[ tag in xml string with null but i don't know how to find or grab this tag using regular expression in swift 2.0

my xml string is something like :

  let xmlvar = "<description>" +              "<![CDATA[<img data-toggle='tooltip' src='uploads/posts/thumbnails/92-9-6-khatami-5-52-on.jpg' alt='123'/><span>123</span>]]>" +              "</description>    

which I need to remove <![CDATA[ and it's end part ]] from xmlvar

any suggestion how ?

No comments:

Post a Comment