.. _functx_node-kind: ================ functx:node-kind ================ O tipo do nó XML (elemento, atributo, texto etc.) Descrição ~~~~~~~~~ A função functx:node-kind devolve o tipo de um nó (ou de uma sequência de nós), um destes valores para cada nó: "element", "attribute", "text", "comment", "processing-instruction" ou "document-node". Se $nodes for a sequência vazia, devolve a sequência vazia. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parâmetros** - **Descrição** * - nodes:node() - o nó ou os nós cujo tipo se quer saber Exemplos ~~~~~~~~ Os exemplos abaixo usam este documento de entrada: .. code-block:: xml xyz .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Resultado** * - 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 Veja também ~~~~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`functx_atomic-type`.