title: How to replace HTML tags and attributes
body: <p>I have a section of code like this</p>
  
  <pre><code>&lt;p style="position:absolute;top:-866px;left:1550px;white-space:nowrap" class="xd"&gt;some text
  </code></pre>
  
  <p></p></p>
  
  <pre><code>&lt;p style="position:absolute;top:-866px;left:1550px;white-space:nowrap" class="xd"&gt;some other text
  </code></pre>
  
  <p></p></p>
  
  <p>and I need to replace it with </p>
  
  <pre><code>&lt;h3&gt;some text&lt;/h3&gt;
  &lt;h3&gt;some other text &lt;/h3&gt;
  </code></pre>
  
  <p>Any help is appreciated.</p>