xmlClose

Version 23.4.8843


xmlClose

Version 23.4.8843


关闭由 xmlOpen 创建的可读 XML 句柄。

必需的参数

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

示例

<!-- 设置一些静态 XML 文本 -->
<arc:set attr="xml.text" value='<Items><foo>bar</foo></Items>' />
<arc:call op="xmlOpen" in="xml" out="output" >
  <!-- 设置传递到第二个运算器的新项目的 xml 句柄 -->
  <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" >
     <!-- 可以在此处为使用句柄的运算器执行附加脚本 -->
  </arc:call>

  <!-- 使用 arc:finally 关键字最后执行句柄的关闭 -->
  <arc:finally>
    <!-- 调用 xmlClose 关闭 xmlOpen 创建的句柄 -->
    <arc:call op="xmlClose" in="xml2" />
  </arc:finally>
</arc:call>