.. _functx_remove-elements-deep:
===========================
functx:remove-elements-deep
===========================
Removes descendant elements from an XML node, based on name
Description
~~~~~~~~~~~
The functx:remove-elements-deep function removes descendant elements from all of
the nodes in $nodes based on name. The $names argument is a sequence of strings
that represent element names to remove. Prefixes can (and must) be used in the
$names values for elements that are prefixed in the input documents. You can
also specify wildcard values "*", "*:" and ":*" in the second argument. See the
description for functx:name-test for details.
.. list-table::
:widths: 40 60
:header-rows: 1
* - **Parameters**
- **Description**
* - nodes:node()
- root(s) to start from
* - names:string()
- the names of the elements to remove
Examples
~~~~~~~~
.. list-table::
:widths: 50 50
:header-rows: 1
* - **XPath**
- **Results**
* - functx:remove-elements-deep($in-xml-1, 'b')
- c1 Mixed
* - functx:remove-elements-deep($in-xml-1, 'a')
- Mixed content
* - functx:remove-elements-deep($in-xml-1, ('b','c'))
-
* - functx:remove-elements-deep($in-xml-2, 'x:b')
- c1 Mixed content
Depends On
~~~~~~~~~~
* :ref:`functx_name-test`.
See Also
~~~~~~~~
.. toctree::
:titlesonly:
:glob:
* :ref:`functx_remove-elements`.
* :ref:`functx_remove-elements-not-contents`.