.. _functx_node-kind: ================ functx:node-kind ================ The XML node kind (element, attribute, text, etc.) Description ~~~~~~~~~~~ The functx:node-kind function returns the node kind of a node (or sequence of nodes), one of the values "element", "attribute", "text", "comment", "processing-instruction", or "document-node" for each node supplied. If $nodes is the empty sequence, it returns the empty sequence. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - nodes:node() - the node(s) whose kind you want to determine Examples ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Results** * - functx:node-kind($in-xml/a) - element * - functx:node-kind($in-xml/a/@z) - attribute * - functx:node-kind($in-xml/comment()) - comment * - functx:node-kind($in-xml/processing-instruction()) - processing-instruction * - functx:node-kind($in-xml/a/text()) - text * - functx:node-kind(doc('http://www.functx.com/input/order.xml')) - document-node See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`functx_atomic-type`.