title: How to Extract Text Node Value From Payload Using XPath in MEL
body: <p>I want to extract some text values from an message's XML payload so that I can use them in a jdbc query.  </p>
  
  <p>Given the test XML file below I want to obtain the string value of first book's author text node. </p>
  
  <p>Something like:</p>
  
  <pre class="lang-sql prettyprint-override"><code>INSERT INTO books VALUES (#[xpath('/catalog/book[0]/author/text()')])
  </code></pre>
  
  <p>To test the expression I am just using a logger but can't seem to get it to extract correctly.  </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;logger message="#[xpath('/catalog/book[0]/author/text()')]" level="DEBUG" doc:name="Logger"/&gt;
  </code></pre>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0"?&gt;
  &lt;catalog&gt;
      &lt;book id="bk101"&gt;
          &lt;author&gt;Gambardella, Matthew&lt;/author&gt;
          &lt;title&gt;XML Developer's Guide&lt;/title&gt;
          &lt;genre&gt;Computer&lt;/genre&gt;
          &lt;price&gt;44.95&lt;/price&gt;
          &lt;publish_date&gt;2000-10-01&lt;/publish_date&gt;
     &lt;/book&gt;
     &lt;book id="bk102"&gt;
         &lt;author&gt;Ralls, Kim&lt;/author&gt;
         &lt;title&gt;Midnight Rain&lt;/title&gt;
         &lt;genre&gt;Fantasy&lt;/genre&gt;
         &lt;price&gt;5.95&lt;/price&gt;
         &lt;publish_date&gt;2000-12-16&lt;/publish_date&gt;
     &lt;/book&gt;
  &lt;/catalog&gt;
  </code></pre>