Theelement() node test defined in XPath 2.0 is used to select nodes of a particular primary node type. For example:
//element(*, nt:file)
would select all nodes of primary node typent:file. This includes all node of subtypes ofnt:file as well.