I have an xml which contains some html tags also. When a tag comes in, it breaks the page because it's a self closing tag. Something like:
<iframe width="420" height="315" src="//www.youtube.com/embed/6krfYKxJFqA" frameborder="0" />
I want to replace this and convert it to:
Can anyone provide a c# code with regex to do this. I tried doing:
tmp = tmp.Replace("(<iframe[^>]*)(\\s*/>)", "$1></iframe>");
and
tmp = new Regex(@"(<iframe[^>]*)(\\s*/>)").Replace(tmp, "$1></iframe>");
tmp is the xml containing lot of code + this iframe tag as string.
but with no result.
@