.. _functx_change-element-ns:
========================
functx:change-element-ns
========================
Changes the namespace of XML elements
Description
~~~~~~~~~~~
The functx:change-element-ns function changes the namespace of one or more
elements in $elements to $newns. It does not change the namespace of their
descendant elements; see the functx:change-element-ns-deep function for that
purpose.
.. list-table::
:widths: 40 60
:header-rows: 1
* - **Parameters**
- **Description**
* - elements:element()
- the elements to change
* - newns:string()
- the new namespace
* - prefix:string()
- the prefix to use for the new namespace
Examples
~~~~~~~~
.. list-table::
:widths: 50 50
:header-rows: 1
* - **XPath**
- **Results**
* - functx:change-element-ns($in-xml, 'http://foo','')
- 557 xyz
* - functx:change-element-ns($in-xml, 'http://foo','foo')
- 557 xyz
See Also
~~~~~~~~
.. toctree::
:titlesonly:
:glob:
* :ref:`functx_change-element-ns-deep`.
* :ref:`functx_change-element-names-deep`.