getNodeType
Description
Returns the node type of this node. Xopus follows the node type numbers from the W3C DOM standard.
Example
The following example removes all XML Comments from an element:
<xsl:template match="myrootnode">
<div>
<xsl:apply-templates select="oddlynumberedchild"/>
<div>
<button onclick="removeComments(node)">check</button>
</div>
</div>
</template>
function removeComments(node)
{
for (var i = 0; i < node.getChildNodes().getLength(); i++)
{
var child = node.getChildNodes().item(i);
if (child.getNodeType() == 8) // comment nodes
node.removeChild(child);
}
}
Syntax
XopusNode .getNodeType () : Number
Return Value
Number. The type of this node.