standard.lib.xml.htmlNodeStatus

htmlNodeStatus is available since version 1.0.

Prototype:

number htmlNodeStatus(number node, number legacy)

Parameters

node
a node handle in a tree
legacy
whether to allow deprecated elements (YES is faster here for Element nodes)

Description:

Checks whether the tree node is valid. Experimental (the author only uses the HTML enhancements in a SAX parser).

Return value:

For Element nodes, a return from htmlElementAllowedHere (if legacy allowed) or htmlElementStatusHere (otherwise). for Attribute nodes, a return from htmlAttrAllowed for other nodes, HTML_NA (no checks performed)