Concat function with strings in XPath
<p>I am trying to get the complete address using XPath. I am new to XPath. This is what I have done so far:</p>

<pre><code>&lt;p class="adr" prop1="address"&gt;
&lt;span class="street-address" name="streetname"&gt;2222 Warnar Ave&lt;/span&gt;
&lt;span class="country" name="country"&gt;USA, &lt;/span&gt;
&lt;span name="State"&gt;CA&lt;/span&gt;
&lt;span name="zip"&gt;1111&lt;/span&gt;
&lt;/p&gt;
</code></pre>

<p>My XPath </p>

<pre><code>/p/span/text()
</code></pre>

<p>Result like an array:</p>

<pre><code>Text='2222 Warnar Ave'
Text='USA,'
Text='CA'
Text='1111'
</code></pre>

<p>And I want the result as a complete one line address</p>

<pre><code>2222 Warnar Ave USA, CA 1111
</code></pre>

<p>I have used <code>concat()</code> in my XPath but nothing is showing!</p>