375.3. 变量

XPath 中的变量在不同的命名空间中定义。默认命名空间是 http://camel.apache.org/schema/spring

Namespace URI本地部分类型描述

http://camel.apache.org/xml/in/

in

消息

Exchange.in 消息

http://camel.apache.org/xml/out/

out

消息

Exchange.out 消息

http://camel.apache.org/xml/function/

功能

对象

Camel 2.5: 附加功能

http://camel.apache.org/xml/variables/environment-variables

env

对象

OS 环境变量

http://camel.apache.org/xml/variables/system-properties

system

对象

Java 系统属性

http://camel.apache.org/xml/variables/exchange-property

 

对象

exchange 属性

Camel 将根据以下方法解析变量:

  • 给定命名空间
  • 未提供命名空间

375.3.1. 给定命名空间

如果指定命名空间,Camel 将指示 Camel 准确返回的内容。但是,当解析 Camel 或 out Camel 时,会尝试首先使用给定本地部分解析标头,并返回。如果本地部分具有值 正文,则返回正文。