HTML tags only

Topics: Developer Forum
May 17, 2011 at 7:29 AM

Hi

I am new to the HTML Agility Pack but will need to use it to migrate some legacy websites over to our new system.  I was wondering whether it is possible to extract only the tags and attributes and discard the content?

E.g.

<div id="id1">

<p>Text1</P>

<p>Text2</p>

</div>

will become just:

<div id="id1">

<p></p>

<p></p>

</div>

Thanks