CONTENTS_BY_TAG_NAME

Syntax

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

Description

Returns all content of elements with the specified tag name as a list.

Example

Download the example file: HTML_File_Example.html

Given the following excerpt from the HTML file:

<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>


In order to return the content found in the table data tag <td>, select the column with your HTML data as the HTML argument and use td as the tag name argument.

The result is all of the content in the <td> tag displayed as a list.

[affected: 4 Million People, affected: 2 Million People, affected: 1 Million People, New York, San Francisco, Atlanta, Bread, Biscuits, Rolls, Sandwich, Soup, Salad]