This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

ismissing

Find HTML trees without values

Syntax

tf = ismissing(tree)

Description

example

tf = ismissing(tree) returns a logical array that indicates which elements of tree do not reference HTML trees. For example, if tree is given by the Parent property of a root node, then the function returns 1 (true).

Examples

collapse all

To test if an HTML tree object represents a root node, test that the Parent property is missing.

Read HTML code from the URL https://www.mathworks.com/help/textanalytics using webread.

url = "https://www.mathworks.com/help/textanalytics";
code = webread(url);

Parse the HTML code using htmlTree.

tree = htmlTree(code);

Test if the parent of tree references an HTML tree.

tf = ismissing(tree.Parent)
tf = logical
   1

Since tree represents the root node of the HTML tree, the value of tree.Parent is missing and the ismissing function returns 1 (true).

Input Arguments

collapse all

HTML tree, specified as an htmlTree array.

Introduced in R2018b