title: Returning more than one node as a string using the string() function in XPath
body: <p>I'm currently delving into the wonderful world of XML.. After having a bit of a tinker with an XML set up there is one thing that has me stumped which I noticed when trying to build a navigation. I'll set up an example below to demonstrate my issue.</p>
  
  <pre><code>&lt;cfxml variable="myXML"&gt;
      &lt;navigation&gt;
          &lt;navItem&gt;
              &lt;name&gt;Mens&lt;/name&gt;
          &lt;/navItem&gt;
  
          &lt;navItem&gt;
              &lt;name&gt;Womens&lt;/name&gt;
          &lt;/navItem&gt;
      &lt;/navigation&gt;
  &lt;/cfxml&gt;
  
  &lt;cfset navList = arrayToList(xmlSearch(xmlParse(myXML),
      "string(//navItem/name/text()), "^")&gt;
  
  &lt;cfloop list="#navList#" delimiter="^" index="nav"&gt;
      &lt;cfoutput&gt;
          #nav#
      &lt;/cfoutput&gt;
  &lt;/cfloop&gt;
  </code></pre>
  
  <p>My aim is to have this:</p>
  
  <pre><code>Mens
  Womens
  </code></pre>
  
  <p>This may begin to make sense to some now. I'm trying to return the name value as a string of <strong>EACH</strong> <code>&lt;navItem&gt;</code> within the XML tree. Of course the error i'm being thrown does make sense, however now i'm stuck as to how I go about returning multiple nodes values as strings.</p>
  
  <p>The error I recieve states:</p>
  
  <pre><code>Unable to process the result of the XMLSearch for A sequence
  of more than one item is not allowed as the first argument
  of string() (text("Mens"), text("Womens")).
  </code></pre>
  
  <p>Followed by:</p>
  
  <pre><code>ColdFusion is unable to process the result of the XPath search.
  You may have an undefined variable in the xpath expression.
  </code></pre>
  
  <p>Can anyone point in me along the right lines of what im after?</p>