I have a string like this:
<p>
This is some text
</p>
<p>
This is some text
</p>
<p>
This is some text
</p>
<blockquote data-id="1">
    This is some text
    <blockquote data-id="2">
        This is some text
    </blockquote>
</blockquote>
<blockquote data-id="3">
    <blockquote data-id="4">
        This is some text
        <blockquote data-id="5">
            This is some text
        </blockquote>
    </blockquote>
    This is some text
</blockquote>
<blockquote data-id="6">
    This is some text
</blockquote>
I want to keep the outermost blockquote tags, but delete the contents. So I want to convert the above to this:
<p>
This is some text
</p>
<p>
This is some text
</p>
<p>
This is some text
</p>
<blockquote data-id="1"></blockquote>
<blockquote data-id="3"></blockquote>
<blockquote data-id="6"></blockquote>
What is an efficient way to do this in PHP?
 
    