Page tree
Skip to end of metadata
Go to start of metadata

Syntax

REMOVE_ELEMENTS_BY_TAG_NAME(<string [containing HTML elements]>;<tag name>)

Description

Removes the specified HTML elements (tags and content) from a string.

This removes inner elements as well.

Example

Download the example file: HTML_File_Example.html

Given the following excerpt from the HTML file:

<head>
	<title>HTML Example</title>
</head>
<body>
	<h1>Affected People</h1>
	<div id="div1">The cities in which we live</div>
	<div id="div2">The food we eat for dinner</div>
	<table border="1" rules="groups">
		<thead>
			<tr>
				<th>Association 1</th>
				<th>Association 2</th>
				<th>Association 3</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td><i>affected:<br>4 Million People</i></td>
				<td><i>affected:<br>2 Million People</i></td>
				<td><i>affected:<br>1 Million People</i></td>
			</tr>
		</tfoot>
		<tbody>
			<tr>
				<td>New York</td>
				<td>San Francisco</td>
				<td>Atlanta</td>
			</tr>
			<tr>
				<td>Bread</td>
				<td>Biscuits</td>
				<td>Rolls</td>
			</tr>
			<tr>
				<td>Sandwich</td>
				<td>Soup</td>
				<td>Salad</td>
			</tr>
		</tbody>
	</table>
</body>

This example removes all table <table> elements from the HTML.

Select the column with your HTML data as the HTML argument and use table as the tag name argument.

The result is the HTML data without the <table> element.

<head>
	<title>HTML Example</title>
</head>
<body>
	<h1>Affected People</h1>
	<div id="div1"> The cities in which we live </div>
	<div id="div2"> The food we eat for dinner </div> 
</body>
  • No labels