title: Add Nokogiri parse result to variable
body: <p>I have an XML document:</p>
  
  <pre><code>&lt;cred&gt;
  &lt;login&gt;Tove&lt;/login&gt;
  &lt;pass&gt;Jani&lt;/pass&gt;
  &lt;/cred&gt;
  </code></pre>
  
  <p>My code is:</p>
  
  <pre><code>require 'nokogiri'
  require 'selwet'
  
  context "parse xml" do doc = Nokogiri::XML(File.open("test.xml"))
  doc.xpath("cred/login").each do
  
  |char_element|
  
  puts char_element.text
  
  end
  
  should "check" do
  Unit.go_to "http://www.ya.ru/"
  Unit.click '.b-inline'
  Unit.fill '[name="login"]', @login
  end
  </code></pre>
  
  <p>When I run my test I get:</p>
  
  <pre><code> Tove
   0
  </code></pre>
  
  <p>But I want to insert the parse result to <code>@login</code>. How can I get variables with the parsing result? Do I need to insert the <code>login</code> and <code>pass</code> values from the XML to fields in the web page?</p>