I have this HTML snippet:
I want to remove all class names in all DIV-tags and end up with only <div>. And do the same with other tags like ID or SPAN tags. Examples:
<span class="username"> becomes <span>
<div class="message"> becomes <div>
<li class="blockbody" id="post_1"> becomes <li>
<blockquote class="restore"> becomes <blockquote>
<ul id="post"> becomes <ul>
etc.
I'm looking for a VBA solution.
The reason is I want clean HTML-tags with only the basic formating like this.
Rich (BB code):
<ul id="post">
<li class="blockbody" id="post_1">
<div class="header">
<div class="datetime">
8 februari 2024, 14:30
</div><span class="username">JaneDoe</span>
</div>
<div class="content">
<blockquote class="restore">
<div class="container">
<div class="description">
QUOTE:
</div>
<div class="quote_printable">
<hr>
<div>
Originally posted by <strong>JohnDoe</strong> <a href="showthread.php?s=49711caa43ab7391973823e5bb92b6a9&p=832072#post832072" rel="nofollow"><img alt="Bekijk bericht" class="inlineimg" src="images/styles/Aesthetica/buttons/viewpost.gif"></a>
</div>
<div class="message">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
</div>
<hr>
</div>
</div>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</blockquote>
</div>
</li>
</ul>
I want to remove all class names in all DIV-tags and end up with only <div>. And do the same with other tags like ID or SPAN tags. Examples:
<span class="username"> becomes <span>
<div class="message"> becomes <div>
<li class="blockbody" id="post_1"> becomes <li>
<blockquote class="restore"> becomes <blockquote>
<ul id="post"> becomes <ul>
etc.
I'm looking for a VBA solution.
The reason is I want clean HTML-tags with only the basic formating like this.