I am working on XML documents using c#.
<data>
<single>
<p xmlns="http://www.w3.org/1999/xhtml">
<strong>Hi hello bbvahvgxvzhavxhgsavxv</strong>
</p>
<p xmlns="http://www.w3.org/1999/xhtml">
<strong>dmcdnsbcdbn</strong>
</p>
</single>
<single>
<div xmlns="http://www.w3.org/1999/xhtml">
<strong>Hi hello bbvahvgxvzhavxhgsavxv</strong>
</div>
<span xmlns="http://www.w3.org/1999/xhtml">
<strong>dmcdnsbcdbn</strong>
</span>
</single>
</data>
I want to remove all the <p>
, <div>
, and <span>
tags.
Output needed:
<data>
<single>
<strong>Hi hello bbvahvgxvzhavxhgsavxv</strong>
<strong>dmcdnsbcdbn</strong>
</single>
<single>
<strong>Hi hello bbvahvgxvzhavxhgsavxv</strong>
<strong>dmcdnsbcdbn</strong>
</single>
</data>
Can any one suggest how to do it using C#. using XmlDocument.