title: Simple Xpath query in scala
body: <p>I'm trying to run a XPath query with scala and it doesn't seem to work. 
  My Xml looks like ( simplified): </p>
  
  <pre><code>&lt;application&gt;
    &lt;process type="output" size ="23"&gt; 
       &lt;channel offset="0"/&gt;
        ....
       &lt;channel offset="4"/&gt;
    &lt;/process&gt;
    &lt;process type="input" size ="16"&gt; 
       &lt;channel offset="20"/&gt;
        ....
       &lt;channel offset="24"/&gt;
    &lt;/process&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p>I want to retrieve the <code>process</code> with the <code>input</code> attribute and for that i use this XPath query:</p>
  
  <pre><code>//process[@type='input']
  </code></pre>
  
  <p>This should work, i verified it with <a href="http://www.xpathtester.com/test" rel="noreferrer">xpathtester</a>
  Now, my scala code looks like: </p>
  
  <pre><code>import scala.xml._
  val x = XML.loadFile("file.xml")
  
  val process = (x \\ "process[@type='input']")  // will return empty NodeSeq() !!!
  </code></pre>
  
  <p>The <code>process</code> ends up empty, it does't capture what I want. I worked it around like this: </p>
  
  <pre><code>val process = (x \\ "process" filter( _ \"@type" contains Text("input")))
  </code></pre>
  
  <p>which is much uglier. Any known reason why my original query shouldn't work? </p>