camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r997322 [3/4] - in /websites/production/camel/content: batch-consumer.html book-in-one-page.html book-languages-appendix.html cache/main.pageCache xpath.html
Date Tue, 13 Sep 2016 18:18:47 GMT
Modified: websites/production/camel/content/book-languages-appendix.html
==============================================================================
--- websites/production/camel/content/book-languages-appendix.html (original)
+++ websites/production/camel/content/book-languages-appendix.html Tue Sep 13 18:18:47 2016
@@ -1200,34 +1200,17 @@ Could not resolve placeholder 'date:
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[.setHeader(&quot;myHeader&quot;).sql(&quot;resource:classpath:mysql.sql&quot;)
 ]]></script>
 </div></div>
-<h2 id="BookLanguagesAppendix-XPath">XPath</h2>
-
-<p>Camel supports <a shape="rect" class="external-link" href="http://www.w3.org/TR/xpath" rel="nofollow">XPath</a> to allow an <a shape="rect" href="expression.html">Expression</a> or <a shape="rect" href="predicate.html">Predicate</a> to be used in the <a shape="rect" href="dsl.html">DSL</a> or <a shape="rect" href="xml-configuration.html">Xml Configuration</a>. For example you could use XPath to create an <a shape="rect" href="predicate.html">Predicate</a> in a <a shape="rect" href="message-filter.html">Message Filter</a> or as an <a shape="rect" href="expression.html">Expression</a> for a <a shape="rect" href="recipient-list.html">Recipient List</a>.</p>
-
-<div class="confluence-information-macro confluence-information-macro-information"><p class="title">Streams</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
-<p>If the message body is stream based, which means the input it receives is submitted to Camel as a stream. That means you will only be able to read the content of the stream <strong>once</strong>. So often when you use <a shape="rect" href="xpath.html">XPath</a> as <a shape="rect" href="message-filter.html">Message Filter</a> or <a shape="rect" href="content-based-router.html">Content Based Router</a> then you need to access the data multiple times, and you should use <a shape="rect" href="stream-caching.html">Stream Caching</a> or convert the message body to a <code>String</code> prior which is safe to be re-read multiple times.</p></div></div>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-from(&quot;queue:foo&quot;).
-  filter().xpath(&quot;//foo&quot;)).
-  to(&quot;queue:bar&quot;)
+<h2 id="BookLanguagesAppendix-XPath">XPath</h2><p>Camel supports <a shape="rect" class="external-link" href="http://www.w3.org/TR/xpath" rel="nofollow">XPath</a> to allow an <a shape="rect" href="expression.html">Expression</a> or <a shape="rect" href="predicate.html">Predicate</a> to be used in the <a shape="rect" href="dsl.html">DSL</a> or <a shape="rect" href="xml-configuration.html">Xml Configuration</a>. For example you could use XPath to create an <a shape="rect" href="predicate.html">Predicate</a> in a <a shape="rect" href="message-filter.html">Message Filter</a> or as an <a shape="rect" href="expression.html">Expression</a> for a <a shape="rect" href="recipient-list.html">Recipient List</a>.</p><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Streams</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>If the message body is stre
 am based, which means the input is received by Camel as a stream, then you will only be able to read the content of the stream <strong>once</strong>. Oftentimes when using <a shape="rect" href="xpath.html">XPath</a> as <a shape="rect" href="message-filter.html">Message Filter</a> or <a shape="rect" href="content-based-router.html">Content Based Router</a> the data will be accessed multiple times. Therefore use <a shape="rect" href="stream-caching.html">Stream caching</a> or convert the message body to a <strong><code>String</code></strong> beforehand. This makes it safe to be re-read multiple times.</p></div></div><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from(&quot;queue:foo&quot;)
+  .filter().xpath(&quot;//foo&quot;))
+  .to(&quot;queue:bar&quot;)
+]]></script>
+</div></div><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from(&quot;queue:foo&quot;)
+  .choice().xpath(&quot;//foo&quot;)).to(&quot;queue:bar&quot;)
+  .otherwise().to(&quot;queue:others&quot;);
 ]]></script>
-</div></div>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-from(&quot;queue:foo&quot;).
-  choice().xpath(&quot;//foo&quot;)).to(&quot;queue:bar&quot;).
-  otherwise().to(&quot;queue:others&quot;);
-]]></script>
-</div></div>
-
-<h3 id="BookLanguagesAppendix-Namespaces">Namespaces</h3>
-
-<p>You can easily use namespaces with XPath expressions using the Namespaces helper class.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-Namespaces">Namespaces</h3><p>You can easily use namespaces with XPath expressions using the Namespaces helper class.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 Namespaces ns = new Namespaces(&quot;c&quot;, &quot;http://acme.com/cheese&quot;);
 
@@ -1235,48 +1218,14 @@ from(&quot;direct:start&quot;).filter().
         xpath(&quot;/c:person[@name=&#39;James&#39;]&quot;, ns).
         to(&quot;mock:result&quot;);
 ]]></script>
-</div></div>
-
-<h3 id="BookLanguagesAppendix-Variables.6">Variables</h3>
-
-<p>Variables in XPath is defined in different namespaces. The default namespace is <code><a shape="rect" class="external-link" href="http://camel.apache.org/schema/spring">http://camel.apache.org/schema/spring</a></code>.</p>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Namespace URI </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Local part </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Type </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" class="external-link" href="http://camel.apache.org/xml/in/">http://camel.apache.org/xml/in/</a> </td><td colspan="1" rowspan="1" class="confluenceTd"><p> in </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Message </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> the exchange.in message </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" class="external-link" href="http://camel.apache.org/xml/out/">http://camel.apache.org/xml/out/</a> </td><td colspan="1" rowspan="1" class="confluenceTd"><p>  out </p></
 td><td colspan="1" rowspan="1" class="confluenceTd"><p> Message </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> the exchange.out message </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" class="external-link" href="http://camel.apache.org/xml/function/">http://camel.apache.org/xml/function/</a> </td><td colspan="1" rowspan="1" class="confluenceTd"><p> functions </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Object </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.5:</strong> Additional functions </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" class="external-link" href="http://camel.apache.org/xml/variables/environment-variables">http://camel.apache.org/xml/variables/environment-variables</a> </td><td colspan="1" rowspan="1" class="confluenceTd"><p> env </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Object </p></td><td colspan="1" rowspan="1" 
 class="confluenceTd"><p> OS environment variables </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" class="external-link" href="http://camel.apache.org/xml/variables/system-properties">http://camel.apache.org/xml/variables/system-properties</a> </td><td colspan="1" rowspan="1" class="confluenceTd"><p> system </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Object </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Java System properties </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <a shape="rect" class="external-link" href="http://camel.apache.org/xml/variables/exchange-property">http://camel.apache.org/xml/variables/exchange-property</a> </td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Object </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> the exchange property </p></td></tr></tbody></table></div>
-
-
-<p>Camel will resolve variables according to either:</p>
-<ul class="alternate"><li>namespace given</li><li>no namespace given</li></ul>
-
-
-<h4 id="BookLanguagesAppendix-Namespacegiven">Namespace given</h4>
-<p>If the namespace is given then Camel is instructed exactly what to return. However when resolving either <strong>in</strong> or <strong>out</strong> Camel will try to resolve a header with the given local part first, and return it. If the local part has the value <strong>body</strong> then the body is returned instead. </p>
-
-<h4 id="BookLanguagesAppendix-Nonamespacegiven">No namespace given</h4>
-<p>If there is no namespace given then Camel resolves only based on the local part. Camel will try to resolve a variable in the following steps:</p>
-<ul class="alternate"><li>from <code>variables</code> that has been set using the <code>variable(name, value)</code> fluent builder</li><li>from message.in.header if there is a header with the given key</li><li>from exchange.properties if there is a property with the given key</li></ul>
-
-
-<h3 id="BookLanguagesAppendix-Functions">Functions</h3>
-<p>Camel adds the following XPath functions that can be used to access the exchange:</p>
-
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Function </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Argument </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Type </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> in:body </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> none </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Object </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Will return the <strong>in</strong> message body. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> in:header </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> the header name </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Object </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Will return the <strong>in</strong> mess
 age header. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> out:body </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> none </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Object </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Will return the <strong>out</strong> message body. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> out:header </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> the header name </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Object </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Will return the <strong>out</strong> message header. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> function:properties </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> key for property </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> String </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Cam
 el 2.5:</strong> To lookup a property using the <a shape="rect" href="properties.html">Properties</a> component (property placeholders). </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> function:simple </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> simple expression </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Object </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.5:</strong> To evaluate a <a shape="rect" href="simple.html">Simple</a> expression. </p></td></tr></tbody></table></div>
-
-
-<p><strong>Notice:</strong> <code>function:properties</code> and <code>function:simple</code> is not supported when the return type is a <code>NodeSet</code>, such as when using with a <a shape="rect" href="splitter.html">Splitter</a> EIP.</p>
-
-<p>Here's an example showing some of these functions in use.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-Variables.6">Variables</h3><p>Variables in XPath is defined in different namespaces. The default namespace is <code><a shape="rect" class="external-link" href="http://camel.apache.org/schema/spring">http://camel.apache.org/schema/spring</a></code>.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Namespace URI</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Local part</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" class="external-link" href="http://camel.apache.org/xml/in/">http://camel.apache.org/xml/in/</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Message</code></p></td><td colspan="1" rowspan
 ="1" class="confluenceTd"><p>The&#160;<strong><code>exchange.in</code></strong> message.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" class="external-link" href="http://camel.apache.org/xml/out/">http://camel.apache.org/xml/out/</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>out</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Message</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The&#160;<strong><code>exchange.out</code></strong> message.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" class="external-link" href="http://camel.apache.org/xml/function/">http://camel.apache.org/xml/function/</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>functions</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> Additional fun
 ctions.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" class="external-link" href="http://camel.apache.org/xml/variables/environment-variables">http://camel.apache.org/xml/variables/environment-variables</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>env</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><code>Object</code></td><td colspan="1" rowspan="1" class="confluenceTd"><p>OS environment variables.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" class="external-link" href="http://camel.apache.org/xml/variables/system-properties">http://camel.apache.org/xml/variables/system-properties</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>system</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><code>Object</code></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Java System properties.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluence
 Td"><a shape="rect" class="external-link" href="http://camel.apache.org/xml/variables/exchange-property">http://camel.apache.org/xml/variables/exchange-property</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The exchange property.</p></td></tr></tbody></table></div><p>Camel will resolve variables according to either:</p><ul class="alternate"><li>namespace given</li><li>no namespace given</li></ul><h4 id="BookLanguagesAppendix-NamespaceGiven">Namespace Given</h4><p>If the namespace is given then Camel is instructed exactly what to return. However when resolving either&#160;<strong><code>IN</code></strong> or&#160;<strong><code>OUT</code></strong> Camel will try to resolve a header with the given local part first, and return it. If the local part has the value&#160;<strong><code>body</code></strong> then the body is returned in
 stead.</p><h4 id="BookLanguagesAppendix-NoNamespaceGiven">No Namespace Given</h4><p>If there is no namespace given then Camel resolves only based on the local part. Camel will try to resolve a variable in the following steps:</p><ul class="alternate"><li>From <strong><code>variables</code></strong> that has been set using the <strong><code>variable(name, value)</code></strong> fluent builder.</li><li>From&#160;<strong><code>message.in.header</code></strong> if there is a header with the given key.</li><li>From&#160;<strong><code>exchange.properties</code></strong> if there is a property with the given key.</li></ul><h3 id="BookLanguagesAppendix-Functions">Functions</h3><p>Camel adds the following XPath functions that can be used to access the exchange:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Function</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Argument</p></th><th colspan="1" rowspan="1"
  class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in:body</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>none</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Will return the&#160;<strong><code>IN</code></strong> message body.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in:header</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the header name</p></td><td colspan="1" rowspan="1" class="confluenceTd"><code>Object</code></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Will return the&#160;<strong><code>IN</code></strong> message header.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>out:body</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>none</p></
 td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Will return the&#160;<strong><code>OUT</code></strong> message body.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>out:header</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the header name</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Will return the&#160;<strong><code>OUT</code></strong> message header.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>function:properties</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>key for property</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> To lookup a property using the <a shape="rect" href="properties.ht
 ml">Properties</a> component (property placeholders).</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>function:simple</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>simple expression</p></td><td colspan="1" rowspan="1" class="confluenceTd"><code>Object</code></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> To evaluate a <a shape="rect" href="simple.html">Simple</a> expression.</p></td></tr></tbody></table></div><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><strong>Note: <code>function:properties</code></strong> and <strong><code>function:simple</code></strong> is not supported when the return type is a <strong><code>NodeSet</code></strong>, such as when using with a <a shape="rect" href="splitter.html">Splitter</a> EIP.</di
 v></div><p>Here's an example showing some of these functions in use.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 from(&quot;direct:start&quot;).choice()
   .when().xpath(&quot;in:header(&#39;foo&#39;) = &#39;bar&#39;&quot;).to(&quot;mock:x&quot;)
   .when().xpath(&quot;in:body() = &#39;&lt;two/&gt;&#39;&quot;).to(&quot;mock:y&quot;)
   .otherwise().to(&quot;mock:z&quot;);
 ]]></script>
-</div></div>
-
-<p>And the new functions introduced in Camel 2.5:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div>And the new functions introduced in Camel 2.5:<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 // setup properties component
 PropertiesComponent properties = new PropertiesComponent();
@@ -1301,16 +1250,8 @@ from(&quot;direct:in&quot;).choice()
         .to(&quot;mock:other&quot;)
     .end();
 ]]></script>
-</div></div>
-
-
-<h3 id="BookLanguagesAppendix-UsingXMLconfiguration.1">Using XML configuration</h3>
-
-<p>If you prefer to configure your routes in your <a shape="rect" href="spring.html">Spring</a> XML file then you can use XPath expressions as follows</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
+</div></div><h3 id="BookLanguagesAppendix-UsingXMLConfiguration">Using XML Configuration</h3><p>If you prefer to configure your routes in your <a shape="rect" href="spring.html">Spring</a> XML file then you can use XPath expressions as follows</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
        xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
        xsi:schemaLocation=&quot;
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
@@ -1327,46 +1268,16 @@ from(&quot;direct:in&quot;).choice()
   &lt;/camelContext&gt;
 &lt;/beans&gt;
 ]]></script>
-</div></div>
-
-<p>Notice how we can reuse the namespace prefixes, <strong>foo</strong> in this case, in the XPath expression for easier namespace based XPath expressions!</p>
-
-<p>See also this <a shape="rect" class="external-link" href="http://camel.465427.n5.nabble.com/fail-filter-XPATH-camel-td476424.html" rel="nofollow">discussion on the mailinglist</a> about using your own namespaces with xpath</p>
-
-<h3 id="BookLanguagesAppendix-Settingresulttype.1">Setting result type</h3>
-<p>The <a shape="rect" href="xpath.html">XPath</a> expression will return a result type using native XML objects such as <code>org.w3c.dom.NodeList</code>. But many times you want a result type to be a String. To do this you have to instruct the <a shape="rect" href="xpath.html">XPath</a> which result type to use.</p>
-
-<p>In Java DSL:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-xpath(&quot;/foo:person/@id&quot;, String.class)
+</div></div><p>Notice how we can reuse the namespace prefixes,&#160;<strong><code>foo</code></strong> in this case, in the XPath expression for easier namespace based XPath expressions! See also this <a shape="rect" class="external-link" href="http://camel.465427.n5.nabble.com/fail-filter-XPATH-camel-td476424.html" rel="nofollow">discussion on the mailinglist</a> about using your own namespaces with XPath.</p><h3 id="BookLanguagesAppendix-SettingtheResultType">Setting the Result Type</h3><p>The <a shape="rect" href="xpath.html">XPath</a> expression will return a result type using native XML objects such as <strong><code>org.w3c.dom.NodeList</code></strong>. But many times you want a result type to be a <strong><code>String</code></strong>. To do this you have to instruct the <a shape="rect" href="xpath.html">XPath</a> which result type to use.</p><p>In Java DSL:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[xpath(&quot;/foo:person/@id&quot;, String.class)
 ]]></script>
-</div></div>
-
-<p>In Spring DSL you use the <strong>resultType</strong> attribute to provide a fully qualified classname:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;xpath resultType=&quot;java.lang.String&quot;&gt;/foo:person/@id&lt;/xpath&gt;
+</div></div><p>In Spring DSL you use the&#160;<strong><code>resultType</code></strong> attribute to provide a fully qualified classname:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;xpath resultType=&quot;java.lang.String&quot;&gt;/foo:person/@id&lt;/xpath&gt;
 ]]></script>
-</div></div>
-
-<p>In @XPath:<br clear="none">
-<strong>Available as of Camel 2.1</strong></p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-@XPath(value = &quot;concat(&#39;foo-&#39;,//order/name/)&quot;, resultType = String.class) String name)
+</div></div><p>In <strong><code>@XPath</code></strong>:<br clear="none"> <strong>Available as of Camel 2.1</strong></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@XPath(value = &quot;concat(&#39;foo-&#39;,//order/name/)&quot;, resultType = String.class) String name)
 ]]></script>
-</div></div>
-<p>Where we use the xpath function concat to prefix the order name with <code>foo-</code>. In this case we have to specify that we want a String as result type so the concat function works.</p>
-
-<h3 id="BookLanguagesAppendix-UsingXPathonHeaders">Using XPath on Headers</h3>
-<p><strong>Available as of Camel 2.11</strong></p>
-
-<p>Some users may have XML stored in a header. To apply an XPath to a header's value you can do this by defining the 'headerName' attribute.</p>
-
-<p>In XML DSL:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Where we use the XPath function&#160;<strong><code>concat</code></strong> to prefix the order name with <strong><code>foo-</code></strong>. In this case we have to specify that we want a&#160;<strong><code>String</code></strong> as result type so the&#160;<strong><code>concat</code></strong> function works.</p><h3 id="BookLanguagesAppendix-UsingXPathonHeaders">Using XPath on Headers</h3><p><strong>Available as of Camel 2.11</strong></p><p>Some users may have XML stored in a header. To apply an XPath statement to a header's value you can do this by defining the&#160;<strong><code>headerName</code></strong> attribute.</p><p>In XML DSL:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 &lt;camelContext id=&quot;xpathHeaderNameTest&quot; xmlns=&quot;http://camel.apache.org/schema/blueprint&quot;&gt;
   &lt;route&gt;
@@ -1389,30 +1300,16 @@ xpath(&quot;/foo:person/@id&quot;, Strin
   &lt;/route&gt;
 &lt;/camelContext&gt;
 ]]></script>
-</div></div>
-
-<p>And in Java DSL you specify the headerName as the 2nd parameter as shown:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-  xpath(&quot;/invoice/@orderType = &#39;premium&#39;&quot;, &quot;invoiceDetails&quot;)
+</div></div>And in Java DSL you specify the&#160;<strong><code>headerName</code></strong> as the 2nd parameter as shown:<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[xpath(&quot;/invoice/@orderType = &#39;premium&#39;&quot;, &quot;invoiceDetails&quot;)
 ]]></script>
-</div></div>
-
-<h3 id="BookLanguagesAppendix-Examples.2">Examples</h3>
-
-<p>Here is a simple <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/XPathFilterTest.java">example</a> using an XPath expression as a predicate in a <a shape="rect" href="message-filter.html">Message Filter</a></p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-Examples.2">Examples</h3><p>Here is a simple <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/XPathFilterTest.java">example</a> using an XPath expression as a predicate in a <a shape="rect" href="message-filter.html">Message Filter</a></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 from(&quot;direct:start&quot;).
         filter().xpath(&quot;/person[@name=&#39;James&#39;]&quot;).
         to(&quot;mock:result&quot;);
 ]]></script>
-</div></div>
-
-<p>If you have a standard set of namespaces you wish to work with and wish to share them across many different XPath expressions you can use the NamespaceBuilder as shown <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/XPathWithNamespaceBuilderFilterTest.java">in this example</a></p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div>If you have a standard set of namespaces you wish to work with and wish to share them across many different XPath expressions you can use the&#160;<strong><code>NamespaceBuilder</code></strong> as shown <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/XPathWithNamespaceBuilderFilterTest.java">in this example</a><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 // lets define the namespaces we&#39;ll need in our filters
 Namespaces ns = new Namespaces(&quot;c&quot;, &quot;http://acme.com/cheese&quot;)
@@ -1423,12 +1320,7 @@ from(&quot;direct:start&quot;).
         filter(ns.xpath(&quot;/c:person[@name=&#39;James&#39;]&quot;)).
         to(&quot;mock:result&quot;);
 ]]></script>
-</div></div>
-
-<p>In this sample we have a choice construct. The first choice evaulates if the message has a header key <strong>type</strong> that has the value <strong>Camel</strong>.<br clear="none">
-The 2nd choice evaluates if the message body has a name tag <strong>&lt;name&gt;</strong> which values is <strong>Kong</strong>.<br clear="none">
-If neither is true the message is routed in the otherwise block:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div>In this sample we have a&#160;<strong><code>choice</code></strong> construct. The first choice evaulates if the message has a header key&#160;<strong><code>type</code></strong> that has the value <strong><code>Camel</code></strong>. The 2nd&#160;<strong><code>choice</code></strong> evaluates if the message body has a name tag&#160;<strong><code>&lt;name&gt;</code></strong> which values is <strong><code>Kong</code></strong>.<br clear="none"> If neither is true the message is routed in the otherwise block:<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 from(&quot;direct:in&quot;).choice()
     // using $headerName is special notation in Camel to get the header key
@@ -1441,10 +1333,7 @@ from(&quot;direct:in&quot;).choice()
         .to(&quot;mock:other&quot;)
     .end();
 ]]></script>
-</div></div>
-
-<p>And the spring XML equivalent of the route:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div>And the spring XML equivalent of the route:<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 &lt;camelContext xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
     &lt;route&gt;
@@ -1465,15 +1354,7 @@ from(&quot;direct:in&quot;).choice()
     &lt;/route&gt;
 &lt;/camelContext&gt;
 ]]></script>
-</div></div>
-
-<h2 id="BookLanguagesAppendix-XPathinjection">XPath injection </h2>
-
-<p>You can use <a shape="rect" href="bean-integration.html">Bean Integration</a> to invoke a method on a bean and use various languages such as XPath to extract a value from the message and bind it to a method parameter.</p>
-
-<p>The default XPath annotation has SOAP and XML namespaces available. If you want to use your own namespace URIs in an XPath expression you can use your own copy of the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/language/XPath.html">XPath annotation</a> to create whatever namespace prefixes you want to use. </p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h2 id="BookLanguagesAppendix-XPathInjection">XPath Injection</h2><p>You can use <a shape="rect" href="bean-integration.html">Bean Integration</a> to invoke a method on a bean and use various languages such as XPath to extract a value from the message and bind it to a method parameter.</p><p>The default XPath annotation has SOAP and XML namespaces available. If you want to use your own namespace URIs in an XPath expression you can use your own copy of the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/language/XPath.html">XPath annotation</a> to create whatever namespace prefixes you want to use.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
@@ -1500,15 +1381,8 @@ public @interface MyXPath {
     Class&lt;?&gt; resultType() default NodeList.class;
 }
 ]]></script>
-</div></div>
-
-<p>i.e. cut and paste upper code to your own project in a different package and/or annotation name then add whatever namespace prefix/uris you want in scope when you use your annotation on a method parameter. Then when you use your annotation on a method parameter all the namespaces you want will be available for use in your XPath expression.</p>
-
-<p>For example</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-public class Foo {
+</div></div>e.g., cut and paste upper code to your own project in a different package and/or annotation name then add whatever namespace prefix/URIs you want in scope when you use your annotation on a method parameter. Then when you use your annotation on a method parameter all the namespaces you want will be available for use in your XPath expression.<p>Example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class Foo {
 	
     @MessageDriven(uri = &quot;activemq:my.queue&quot;)
     public void doSomething(@MyXPath(&quot;/ns1:foo/ns2:bar/text()&quot;) String correlationID, @Body String body) {
@@ -1516,49 +1390,18 @@ public class Foo {
     }
 }
 ]]></script>
-</div></div>
-
-<h3 id="BookLanguagesAppendix-UsingXPathBuilderwithoutanExchange">Using XPathBuilder without an Exchange</h3>
-<p><strong>Available as of Camel 2.3</strong></p>
-
-<p>You can now use the <code>org.apache.camel.builder.XPathBuilder</code> without the need for an <a shape="rect" href="exchange.html">Exchange</a>. This comes handy if you want to use it as a helper to do custom xpath evaluations. </p>
-
-<p>It requires that you pass in a <a shape="rect" href="camelcontext.html">CamelContext</a> since a lot of the moving parts inside the XPathBuilder requires access to the Camel <a shape="rect" href="type-converter.html">Type Converter</a> and hence why <a shape="rect" href="camelcontext.html">CamelContext</a> is needed.</p>
-
-<p>For example you can do something like this:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-boolean matches = XPathBuilder.xpath(&quot;/foo/bar/@xyz&quot;).matches(context, &quot;&lt;foo&gt;&lt;bar xyz=&#39;cheese&#39;/&gt;&lt;/foo&gt;&quot;));
+</div></div><h3 id="BookLanguagesAppendix-UsingXPathBuilderWithoutanExchange">Using XPathBuilder Without an Exchange</h3><p><strong>Available as of Camel 2.3</strong></p><p>You can now use the <strong><code>org.apache.camel.builder.XPathBuilder</code></strong> without the need for an <a shape="rect" href="exchange.html">Exchange</a>. This comes handy if you want to use it as a helper to do custom XPath evaluations. It requires that you pass in a <a shape="rect" href="camelcontext.html">CamelContext</a> since a lot of the moving parts inside the&#160;<strong><code>XPathBuilder</code></strong> requires access to the Camel <a shape="rect" href="type-converter.html">Type Converter</a> and hence why <a shape="rect" href="camelcontext.html">CamelContext</a> is needed.</p><p>For example you can do something like this:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[boolean matches = XPathBuilder.xpath(&quot;/foo/bar/@xyz&quot;).matches(context, &quot;&lt;foo&gt;&lt;bar xyz=&#39;cheese&#39;/&gt;&lt;/foo&gt;&quot;));
 ]]></script>
-</div></div>
-<p>This will match the given predicate.</p>
-
-<p>You can also evaluate for example as shown in the following three examples:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-    String name = XPathBuilder.xpath(&quot;foo/bar&quot;).evaluate(context, &quot;&lt;foo&gt;&lt;bar&gt;cheese&lt;/bar&gt;&lt;/foo&gt;&quot;, String.class);
-    Integer number = XPathBuilder.xpath(&quot;foo/bar&quot;).evaluate(context, &quot;&lt;foo&gt;&lt;bar&gt;123&lt;/bar&gt;&lt;/foo&gt;&quot;, Integer.class);
-    Boolean bool = XPathBuilder.xpath(&quot;foo/bar&quot;).evaluate(context, &quot;&lt;foo&gt;&lt;bar&gt;true&lt;/bar&gt;&lt;/foo&gt;&quot;, Boolean.class);
+</div></div><p>This will match the given predicate.</p><p>You can also evaluate for example as shown in the following three examples:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[String name = XPathBuilder.xpath(&quot;foo/bar&quot;).evaluate(context, &quot;&lt;foo&gt;&lt;bar&gt;cheese&lt;/bar&gt;&lt;/foo&gt;&quot;, String.class);
+Integer number = XPathBuilder.xpath(&quot;foo/bar&quot;).evaluate(context, &quot;&lt;foo&gt;&lt;bar&gt;123&lt;/bar&gt;&lt;/foo&gt;&quot;, Integer.class);
+Boolean bool = XPathBuilder.xpath(&quot;foo/bar&quot;).evaluate(context, &quot;&lt;foo&gt;&lt;bar&gt;true&lt;/bar&gt;&lt;/foo&gt;&quot;, Boolean.class);
 ]]></script>
-</div></div>
-
-<p>Evaluating with a String result is a common requirement and thus you can do it a bit simpler:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-    String name = XPathBuilder.xpath(&quot;foo/bar&quot;).evaluate(context, &quot;&lt;foo&gt;&lt;bar&gt;cheese&lt;/bar&gt;&lt;/foo&gt;&quot;);
+</div></div><p>Evaluating with a String result is a common requirement and thus you can do it a bit simpler:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[    String name = XPathBuilder.xpath(&quot;foo/bar&quot;).evaluate(context, &quot;&lt;foo&gt;&lt;bar&gt;cheese&lt;/bar&gt;&lt;/foo&gt;&quot;);
 ]]></script>
-</div></div>
-
-<h3 id="BookLanguagesAppendix-UsingSaxonwithXPathBuilder">Using Saxon with XPathBuilder</h3>
-<p><strong>Available as of Camel 2.3</strong></p>
-
-<p>You need to add <strong>camel-saxon</strong> as dependency to your project.</p>
-
-<p>Its now easier to use <a shape="rect" class="external-link" href="http://saxon.sourceforge.net/" rel="nofollow">Saxon</a> with the XPathBuilder which can be done in several ways as shown below.<br clear="none">
-Where as the latter ones are the easiest ones.</p>
-
-<p>Using a factory</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-UsingSaxonwithXPathBuilder">Using Saxon with XPathBuilder</h3><p><strong>Available as of Camel 2.3</strong></p><p>You need to add <strong><code>camel-saxon</code></strong> as dependency to your project. It's now easier to use <a shape="rect" class="external-link" href="http://saxon.sourceforge.net/" rel="nofollow">Saxon</a> with the&#160;<strong><code>XPathBuilder</code></strong> which can be done in several ways as shown below. Where as the latter ones are the easiest ones.</p><p>Using a factory</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 // create a Saxon factory
 XPathFactory fac = new net.sf.saxon.xpath.XPathFactoryImpl();
@@ -1570,10 +1413,7 @@ XPathBuilder builder = XPathBuilder.xpat
 String result = builder.evaluate(context, &quot;&lt;foo&gt;&lt;bar&gt;abc_def_ghi&lt;/bar&gt;&lt;/foo&gt;&quot;);
 assertEquals(&quot;def&quot;, result);
 ]]></script>
-</div></div>
-
-<p>Using ObjectModel</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div>Using the object model<strong><br clear="none"></strong><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 // create a builder to evaluate the xpath using saxon based on its object model uri
 XPathBuilder builder = XPathBuilder.xpath(&quot;tokenize(/foo/bar, &#39;_&#39;)[2]&quot;).objectModel(&quot;http://saxon.sf.net/jaxp/xpath/om&quot;);
@@ -1582,10 +1422,7 @@ XPathBuilder builder = XPathBuilder.xpat
 String result = builder.evaluate(context, &quot;&lt;foo&gt;&lt;bar&gt;abc_def_ghi&lt;/bar&gt;&lt;/foo&gt;&quot;);
 assertEquals(&quot;def&quot;, result);
 ]]></script>
-</div></div>
-
-<p>The easy one</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div>The easy one<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 // create a builder to evaluate the xpath using saxon
 XPathBuilder builder = XPathBuilder.xpath(&quot;tokenize(/foo/bar, &#39;_&#39;)[2]&quot;).saxon();
@@ -1594,15 +1431,7 @@ XPathBuilder builder = XPathBuilder.xpat
 String result = builder.evaluate(context, &quot;&lt;foo&gt;&lt;bar&gt;abc_def_ghi&lt;/bar&gt;&lt;/foo&gt;&quot;);
 assertEquals(&quot;def&quot;, result);
 ]]></script>
-</div></div>
-
-<h3 id="BookLanguagesAppendix-SettingacustomXPathFactoryusingSystemProperty">Setting a custom XPathFactory using System Property</h3>
-<p><strong>Available as of Camel 2.3</strong></p>
-
-<p>Camel now supports reading the <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/xpath/XPathFactory.html#newInstance(java.lang.String)" rel="nofollow">JVM system property <code>javax.xml.xpath.XPathFactory</code></a> that can be used to set a custom XPathFactory to use.</p>
-
-<p>This unit test shows how this can be done to use Saxon instead:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-SettingaCustomXPathFactoryUsingSystemProperty">Setting a Custom XPathFactory Using System Property</h3><p><strong>Available as of Camel 2.3</strong></p><p>Camel now supports reading the <a shape="rect" class="external-link" href="http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/xpath/XPathFactory.html#newInstance(java.lang.String)" rel="nofollow">JVM system property <code>javax.xml.xpath.XPathFactory</code></a> that can be used to set a custom&#160;<strong><code>XPathFactory</code></strong> to use.</p><p>This unit test shows how this can be done to use Saxon instead:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 // set system property with the XPath factory to use which is Saxon 
 System.setProperty(XPathFactory.DEFAULT_PROPERTY_NAME + &quot;:&quot; + &quot;http://saxon.sf.net/jaxp/xpath/om&quot;, &quot;net.sf.saxon.xpath.XPathFactoryImpl&quot;);
@@ -1614,124 +1443,40 @@ XPathBuilder builder = XPathBuilder.xpat
 String result = builder.evaluate(context, &quot;&lt;foo&gt;&lt;bar&gt;abc_def_ghi&lt;/bar&gt;&lt;/foo&gt;&quot;);
 assertEquals(&quot;def&quot;, result);
 ]]></script>
-</div></div>
-
-<p>Camel will log at <code>INFO</code> level if it uses a non default XPathFactory such as:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-XPathBuilder  INFO  Using system property javax.xml.xpath.XPathFactory:http://saxon.sf.net/jaxp/xpath/om with value:
+</div></div>Camel will log at <strong><code>INFO</code></strong> level if it uses a non default&#160;<strong><code>XPathFactory</code></strong> such as:<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[XPathBuilder  INFO  Using system property javax.xml.xpath.XPathFactory:http://saxon.sf.net/jaxp/xpath/om with value:
                     net.sf.saxon.xpath.XPathFactoryImpl when creating XPathFactory
 ]]></script>
-</div></div>
-
-<p>To use Apache Xerces you can configure the system property</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
--Djavax.xml.xpath.XPathFactory=org.apache.xpath.jaxp.XPathFactoryImpl
+</div></div><p>To use Apache Xerces you can configure the system property:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[-Djavax.xml.xpath.XPathFactory=org.apache.xpath.jaxp.XPathFactoryImpl
 ]]></script>
-</div></div>
-
-<h3 id="BookLanguagesAppendix-EnablingSaxonfromSpringDSL">Enabling Saxon from Spring DSL</h3>
-<p><strong>Available as of Camel 2.10</strong></p>
-
-<p>Similarly to Java DSL, to enable Saxon from Spring DSL you have three options:</p>
-
-<p>Specifying the factory</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;xpath factoryRef=&quot;saxonFactory&quot; resultType=&quot;java.lang.String&quot;&gt;current-dateTime()&lt;/xpath&gt;
+</div></div><h3 id="BookLanguagesAppendix-EnablingSaxonfromSpringDSL">Enabling Saxon from Spring DSL</h3><p><strong>Available as of Camel 2.10</strong></p><p>Similarly to Java DSL, to enable Saxon from Spring DSL you have three options:</p><p>Specifying the factory</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;xpath factoryRef=&quot;saxonFactory&quot; resultType=&quot;java.lang.String&quot;&gt;current-dateTime()&lt;/xpath&gt;
 ]]></script>
-</div></div>
-
-<p>Specifying the object model</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;xpath objectModel=&quot;http://saxon.sf.net/jaxp/xpath/om&quot; resultType=&quot;java.lang.String&quot;&gt;current-dateTime()&lt;/xpath&gt;
+</div></div><p>Specifying the object model</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;xpath objectModel=&quot;http://saxon.sf.net/jaxp/xpath/om&quot; resultType=&quot;java.lang.String&quot;&gt;current-dateTime()&lt;/xpath&gt;
 ]]></script>
-</div></div>
-
-<p>Shortcut</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;xpath saxon=&quot;true&quot; resultType=&quot;java.lang.String&quot;&gt;current-dateTime()&lt;/xpath&gt;
+</div></div><p>Shortcut</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;xpath saxon=&quot;true&quot; resultType=&quot;java.lang.String&quot;&gt;current-dateTime()&lt;/xpath&gt;
 ]]></script>
-</div></div>
-
-<h3 id="BookLanguagesAppendix-Namespaceauditingtoaiddebugging">Namespace auditing to aid debugging</h3>
-<p><strong>Available as of Camel 2.10</strong></p>
-
-<p>A large number of XPath-related issues that users frequently face are linked to the usage of namespaces. You may have some misalignment between the namespaces present in your message and those that your XPath expression is aware of or referencing. XPath predicates or expressions that are unable to locate the XML elements and attributes due to namespaces issues may simply look like "they are not working", when in reality all there is to it is a lack of namespace definition.</p>
-
-<p>Namespaces in XML are completely necessary, and while we would love to simplify their usage by implementing some magic or voodoo to wire namespaces automatically, truth is that any action down this path would disagree with the standards and would greatly hinder interoperability.</p>
-
-<p>Therefore, the utmost we can do is assist you in debugging such issues by adding two new features to the XPath Expression Language and are thus accesible from both predicates and expressions.</p>
-
-<h4 id="BookLanguagesAppendix-LoggingtheNamespaceContextofyourXPathexpression/predicate">Logging the Namespace Context of your XPath expression/predicate</h4>
-
-<p>Every time a new XPath expression is created in the internal pool, Camel will log the namespace context of the expression under the <code>org.apache.camel.builder.xml.XPathBuilder</code> logger. Since Camel represents Namespace Contexts in a hierarchical fashion (parent-child relationships), the entire tree is output in a recursive manner with the following format:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-[me: {prefix -&gt; namespace}, {prefix -&gt; namespace}], [parent: [me: {prefix -&gt; namespace}, {prefix -&gt; namespace}], [parent: [me: {prefix -&gt; namespace}]]]
+</div></div><h3 id="BookLanguagesAppendix-NamespaceAuditingtoAidDebugging">Namespace Auditing to Aid Debugging</h3><p><strong>Available as of Camel 2.10</strong></p><p>A large number of XPath-related issues that users frequently face are linked to the usage of namespaces. You may have some misalignment between the namespaces present in your message and those that your XPath expression is aware of or referencing. XPath predicates or expressions that are unable to locate the XML elements and attributes due to namespaces issues may simply look like "they are not working", when in reality all there is to it is a lack of namespace definition.</p><p>Namespaces in XML are completely necessary, and while we would love to simplify their usage by implementing some magic or voodoo to wire namespaces automatically, truth is that any action down this path would disagree with the standards and would greatly hinder interoperability.</p><p>Therefore, the utmost we can do is assist you in debugging 
 such issues by adding two new features to the XPath Expression Language and are thus accessible from both predicates and expressions.</p><h4 id="BookLanguagesAppendix-LoggingtheNamespaceContextofYourXPathExpression/Predicate">Logging the Namespace Context of Your XPath Expression/Predicate</h4><p>Every time a new XPath expression is created in the internal pool, Camel will log the namespace context of the expression under the <strong><code>org.apache.camel.builder.xml.XPathBuilder</code></strong> logger. Since Camel represents Namespace Contexts in a hierarchical fashion (parent-child relationships), the entire tree is output in a recursive manner with the following format:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[[me: {prefix -&gt; namespace}, {prefix -&gt; namespace}], [parent: [me: {prefix -&gt; namespace}, {prefix -&gt; namespace}], [parent: [me: {prefix -&gt; namespace}]]]
 ]]></script>
-</div></div>
-
-<p>Any of these options can be used to activate this logging:</p>
-<ol><li>Enable TRACE logging on the <code>org.apache.camel.builder.xml.XPathBuilder</code> logger, or some parent logger such as <code>org.apache.camel</code> or the root logger</li><li>Enable the <code>logNamespaces</code> option as indicated in <a shape="rect" href="#BookLanguagesAppendix-AuditingNamespaces">Auditing Namespaces</a>, in which case the logging will occur on the INFO level</li></ol>
-
-
-<p><span class="confluence-anchor-link" id="BookLanguagesAppendix-AuditingNamespaces"></span></p>
-<h4 id="BookLanguagesAppendix-Auditingnamespaces">Auditing namespaces </h4>
-
-<p>Camel is able to discover and dump all namespaces present on every incoming message before evaluating an XPath expression, providing all the richness of information you need to help you analyse and pinpoint possible namespace issues. </p>
-
-<p>To achieve this, it in turn internally uses another specially tailored XPath expression to extract all namespace mappings that appear in the message, displaying the prefix and the full namespace URI(s) for each individual mapping. </p>
-
-<p>Some points to take into account:</p>
-
-<ul><li>The implicit XML namespace (xmlns:xml="http://www.w3.org/XML/1998/namespace") is suppressed from the output because it adds no value</li><li>Default namespaces are listed under the DEFAULT keyword in the output</li><li>Keep in mind that namespaces can be remapped under different scopes. Think of a top-level 'a' prefix which in inner elements can be assigned a different namespace, or the default namespace changing in inner scopes. For each discovered prefix, all associated URIs are listed.</li></ul>
-
-
-<p>You can enable this option in Java DSL and Spring DSL.</p>
-
-<p>Java DSL:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-XPathBuilder.xpath(&quot;/foo:person/@id&quot;, String.class).logNamespaces()
+</div></div><p>Any of these options can be used to activate this logging:</p><ol><li>Enable&#160;<strong><code>TRACE</code></strong> logging on the <strong><code>org.apache.camel.builder.xml.XPathBuilder</code></strong> logger, or some parent logger such as <strong><code>org.apache.camel</code></strong> or the root logger.</li><li>Enable the <strong><code>logNamespaces</code></strong> option as indicated in <a shape="rect" href="#BookLanguagesAppendix-AuditingNamespaces">Auditing Namespaces</a>, in which case the logging will occur on the&#160;<strong><code>INFO</code></strong> level.</li></ol><p><span class="confluence-anchor-link" id="BookLanguagesAppendix-AuditingNamespaces"></span></p><h4 id="BookLanguagesAppendix-Auditingnamespaces">Auditing namespaces</h4><p>Camel is able to discover and dump all namespaces present on every incoming message before evaluating an XPath expression, providing all the richness of information you need to help you analyse and pinpoint possible namesp
 ace issues. To achieve this, it in turn internally uses another specially tailored XPath expression to extract all namespace mappings that appear in the message, displaying the prefix and the full namespace URI(s) for each individual mapping.</p><p>Some points to take into account:</p><ul><li>The implicit XML namespace (xmlns:xml="http://www.w3.org/XML/1998/namespace") is suppressed from the output because it adds no value.</li><li>Default namespaces are listed under the&#160;<strong><code>DEFAULT</code></strong> keyword in the output.</li><li>Keep in mind that namespaces can be remapped under different scopes. Think of a top-level 'a' prefix which in inner elements can be assigned a different namespace, or the default namespace changing in inner scopes. For each discovered prefix, all associated URIs are listed.</li></ul><p>You can enable this option in Java DSL and Spring DSL.</p><p>Java DSL:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelCo
 ntent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[XPathBuilder.xpath(&quot;/foo:person/@id&quot;, String.class).logNamespaces()
 ]]></script>
-</div></div>
-
-<p>Spring DSL:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;xpath logNamespaces=&quot;true&quot; resultType=&quot;String&quot;&gt;/foo:person/@id&lt;/xpath&gt;
+</div></div><p>Spring DSL:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;xpath logNamespaces=&quot;true&quot; resultType=&quot;String&quot;&gt;/foo:person/@id&lt;/xpath&gt;
 ]]></script>
-</div></div>
-
-<p>The result of the auditing will be appear at the INFO level under the <code>org.apache.camel.builder.xml.XPathBuilder</code> logger and will look like the following:</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-2012-01-16 13:23:45,878 [stSaxonWithFlag] INFO  XPathBuilder  - Namespaces discovered in message: 
+</div></div><p>The result of the auditing will be appear at the&#160;<strong><code>INFO</code></strong> level under the <strong><code>org.apache.camel.builder.xml.XPathBuilder</code></strong> logger and will look like the following:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[2012-01-16 13:23:45,878 [stSaxonWithFlag] INFO  XPathBuilder  - Namespaces discovered in message: 
 {xmlns:a=[http://apache.org/camel], DEFAULT=[http://apache.org/default], 
 xmlns:b=[http://apache.org/camelA, http://apache.org/camelB]}
 ]]></script>
-</div></div>
-
-<h3 id="BookLanguagesAppendix-Loadingscriptfromexternalresource.5">Loading script from external resource</h3>
-<p><strong>Available as of Camel 2.11</strong></p>
-
-<p>You can externalize the script and have Camel load it from a resource such as <code>"classpath:"</code>, <code>"file:"</code>, or <code>"http:"</code>.<br clear="none">
-This is done using the following syntax: <code>"resource:scheme:location"</code>, eg to refer to a file on the classpath you can do:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-.setHeader(&quot;myHeader&quot;).xpath(&quot;resource:classpath:myxpath.txt&quot;, String.class)
+</div></div><h3 id="BookLanguagesAppendix-LoadingScriptfromExternalResource">Loading Script from External Resource</h3><p><strong>Available as of Camel 2.11</strong></p><p>You can externalize the script and have Camel load it from a resource such as: <strong><code>classpath:</code></strong>, <code><strong>file:</strong></code> or <code><strong>http:</strong></code>.<br clear="none"> This is done using the following syntax: <code><strong>resource:scheme:location</strong></code>, e.g., to refer to a file on the classpath you can do:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[.setHeader(&quot;myHeader&quot;).xpath(&quot;resource:classpath:myxpath.txt&quot;, String.class)
 ]]></script>
-</div></div>
-
-<h3 id="BookLanguagesAppendix-Dependencies.17">Dependencies</h3>
-<p>The XPath language is part of camel-core.</p>
+</div></div><h3 id="BookLanguagesAppendix-Dependencies.17">Dependencies</h3><p>The XPath language is part of camel-core.</p>
 <h2 id="BookLanguagesAppendix-XQuery">XQuery</h2><p>Camel supports <a shape="rect" class="external-link" href="http://www.w3.org/TR/xquery/" rel="nofollow">XQuery</a> to allow an <a shape="rect" href="expression.html">Expression</a> or <a shape="rect" href="predicate.html">Predicate</a> to be used in the <a shape="rect" href="dsl.html">DSL</a> or <a shape="rect" href="xml-configuration.html">Xml Configuration</a>. For example you could use XQuery to create an <a shape="rect" href="predicate.html">Predicate</a> in a <a shape="rect" href="message-filter.html">Message Filter</a> or as an <a shape="rect" href="expression.html">Expression</a> for a <a shape="rect" href="recipient-list.html">Recipient List</a>.</p><h3 id="BookLanguagesAppendix-Options.1">Options</h3><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default V
 alue</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>allowStAX</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8.3/2.9:</strong> Whether to allow using StAX as the <code>javax.xml.transform.Source</code>.</p></td></tr></tbody></table></div></div><h3 id="BookLanguagesAppendix-Examples.3">Examples</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from(&quot;queue:foo&quot;).filter().
   xquery(&quot;//foo&quot;).
@@ -1741,7 +1486,7 @@ This is done using the following syntax:
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[from(&quot;direct:start&quot;).
   recipientList().xquery(&quot;concat(&#39;mock:foo.&#39;, /person/@city)&quot;, String.class);
 ]]></script>
-</div></div><h3 id="BookLanguagesAppendix-Variables.7">Variables</h3><p>The IN message body will be set as the <code>contextItem</code>. Besides this these Variables is also added as parameters:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Variable</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The current Exchange</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.body</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The In message's body</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>out.body</p>
 </td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The OUT message's body (if any)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.headers.*</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>You can access the value of exchange.in.headers with key <strong>foo</strong> by using the variable which name is in.headers.foo</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>out.headers.*</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>You can access the value of exchange.out.headers with key <strong>foo</strong> by using the variable which name is out.headers.foo variable</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>key name</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><
 p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Any exchange.properties and exchange.in.headers and any additional parameters set using <code>setParameters(Map)</code>. These parameters is added with they own key name, for instance if there is an IN header with the key name <strong>foo</strong> then its added as <strong>foo</strong>.</p></td></tr></tbody></table></div><h3 id="BookLanguagesAppendix-UsingXMLconfiguration.2">Using XML configuration</h3><p>If you prefer to configure your routes in your <a shape="rect" href="spring.html">Spring</a> XML file then you can use XPath expressions as follows</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-Variables.7">Variables</h3><p>The IN message body will be set as the <code>contextItem</code>. Besides this these Variables is also added as parameters:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Variable</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The current Exchange</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.body</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The In message's body</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>out.body</p>
 </td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The OUT message's body (if any)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in.headers.*</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>You can access the value of exchange.in.headers with key <strong>foo</strong> by using the variable which name is in.headers.foo</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>out.headers.*</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>You can access the value of exchange.out.headers with key <strong>foo</strong> by using the variable which name is out.headers.foo variable</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>key name</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><
 p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Any exchange.properties and exchange.in.headers and any additional parameters set using <code>setParameters(Map)</code>. These parameters is added with they own key name, for instance if there is an IN header with the key name <strong>foo</strong> then its added as <strong>foo</strong>.</p></td></tr></tbody></table></div><h3 id="BookLanguagesAppendix-UsingXMLconfiguration.1">Using XML configuration</h3><p>If you prefer to configure your routes in your <a shape="rect" href="spring.html">Spring</a> XML file then you can use XPath expressions as follows</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
        xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
        xmlns:foo=&quot;http://example.com/person&quot;
@@ -1790,7 +1535,7 @@ from(&quot;direct:start&quot;).
         filter().xquery(&quot;/c:person[@name=&#39;James&#39;]&quot;, ns).
         to(&quot;mock:result&quot;);
 ]]></script>
-</div></div><h3 id="BookLanguagesAppendix-LearningXQuery">Learning XQuery</h3><p>XQuery is a very powerful language for querying, searching, sorting and returning XML. For help learning XQuery try these tutorials</p><ul><li>Mike Kay's <a shape="rect" class="external-link" href="http://www.stylusstudio.com/xquery_primer.html" rel="nofollow">XQuery Primer</a></li><li>the W3Schools <a shape="rect" class="external-link" href="http://www.w3schools.com/xquery/default.asp" rel="nofollow">XQuery Tutorial</a></li></ul><p>You might also find the <a shape="rect" class="external-link" href="http://www.w3.org/TR/xpath-functions/" rel="nofollow">XQuery function reference</a> useful</p><h3 id="BookLanguagesAppendix-Loadingscriptfromexternalresource.6">Loading script from external resource</h3><p><strong>Available as of Camel 2.11</strong></p><p>You can externalize the script and have Camel load it from a resource such as <code>"classpath:"</code>, <code>"file:"</code>, or <code>"http:"</code>.<br 
 clear="none"> This is done using the following syntax: <code>"resource:scheme:location"</code>, eg to refer to a file on the classpath you can do:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-LearningXQuery">Learning XQuery</h3><p>XQuery is a very powerful language for querying, searching, sorting and returning XML. For help learning XQuery try these tutorials</p><ul><li>Mike Kay's <a shape="rect" class="external-link" href="http://www.stylusstudio.com/xquery_primer.html" rel="nofollow">XQuery Primer</a></li><li>the W3Schools <a shape="rect" class="external-link" href="http://www.w3schools.com/xquery/default.asp" rel="nofollow">XQuery Tutorial</a></li></ul><p>You might also find the <a shape="rect" class="external-link" href="http://www.w3.org/TR/xpath-functions/" rel="nofollow">XQuery function reference</a> useful</p><h3 id="BookLanguagesAppendix-Loadingscriptfromexternalresource.5">Loading script from external resource</h3><p><strong>Available as of Camel 2.11</strong></p><p>You can externalize the script and have Camel load it from a resource such as <code>"classpath:"</code>, <code>"file:"</code>, or <code>"http:"</code>.<br 
 clear="none"> This is done using the following syntax: <code>"resource:scheme:location"</code>, eg to refer to a file on the classpath you can do:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[.setHeader(&quot;myHeader&quot;).xquery(&quot;resource:classpath:myxquery.txt&quot;, String.class)
 ]]></script>
 </div></div><h3 id="BookLanguagesAppendix-Dependencies.18">Dependencies</h3><p>To use XQuery in your camel routes you need to add the a dependency on <strong>camel-saxon</strong> which implements the XQuery language.</p><p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html">the download page for the latest versions</a>).</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.



Mime
View raw message