> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kasoftware.com/llms.txt
> Use this file to discover all available pages before exploring further.

# xmlClose

> 关闭由 xmlOpen 创建的 XML 句柄，以释放打开的资源。

关闭由 [xmlOpen](./op-xml-open) 创建的可读 XML 句柄。

## 必需的参数

* **handle**: 对 XML 数据的可读句柄引用。

## 示例

```xml theme={null}
<!-- Setting some static XML text -->
<arc:set attr="xml.text" value='<Items><foo>bar</foo></Items>' />
<arc:call op="xmlOpen" in="xml" out="output" >
  <!-- Setting the xml handle on a new item that is passed into a second operation  -->
  <arc:set attr="xml2.handle" value="[output.handle]" />
  <arc:set attr="xml2.map:value1" value="/Items/foo" />
  <arc:call op="xmlDOMGet" in="xml2" out="output2" >
    <!-- Here is where you can execute additional script for the operation that is using the handle -->
  </arc:call>

  <!-- Using the arc:finally keyword to execute the closing of the handle last -->
  <arc:finally>
    <!-- Calling xmlClose to close the handle created by xmlOpen -->
    <arc:call op="xmlClose" in="xml2" />
  </arc:finally>
</arc:call>
```
