How can I capture a Java String from a DOM element?
<p><strong>NOTE</strong>: edited by @drachenstern, and I don't mind removing my answer on account of this. The OP is <strike>Russian (I believe)</strike> <em>Ukrainian</em> (with my apologies) and is having an ESL issue describing his problem. Between the two HRs is his original post.</p>

<hr>

<p>order that would make getElementsByTagName ("s"); and give value = '2d331be47563423424abdb7fe2eee6401c7b00417'</p>

<p>my string:</p>

<pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;meta http-equiv='content-type' content='text/html; charset=windows-1251' /&gt;
  &lt;/head&gt;
  &lt;body onload="try { document.getElementById('l').submit(); } catch(e) { document.getElementsByTagName('form')[0].submit(); }"&gt;
    &lt;form id='l' method='post' action='http://vkontakte.ru/login.php'&gt;
      &lt;input type='hidden' name='s' value='2d331be47563423424abdb7fe2eee6401c7b00417' /&gt;
            &lt;input type='hidden' name='op' value='slogin' /&gt;
      &lt;input type='hidden' name='redirect' value='1' /&gt;
      &lt;input type='hidden' name='expire' value='0' /&gt;
      &lt;input type='hidden' name='to' value='' /&gt;
    &lt;/form&gt;
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I need Convert String to DOM model order that would make parsing</p>

<p>I write this is my String in Java!</p>

<pre><code>String mystr = "&lt;html....&lt;/html&gt;";
</code></pre>

<p>Russian - "У меня есть строка в JAVA она содержит в себе html файл(страницу сайта). Мне нужна функция которая достанет value в input. Я знаю что это можно прекрасно сделать через DOM модель, но у меня не получается это сделать."</p>

<pre><code>DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
InputSource is = new InputSource( new StringReader( body ) );
Document d = builder.parse( is );
String ss = d.getElementById("s").getNodeValue(); //- null
</code></pre>

<hr>

<p>He understands the way to parse for an element in Javascript is via something like <code>getElementsByTagName('s');</code> and he wants to find the equivalent way to do this in Java. He doesn't know what library he needs. For what it's worth, I don't write Java either. He can only explain one metaphor with another tho.</p>

<p>Google translates his Russian request as:</p>

<blockquote>
  <p>I have a string in JAVA it contains
  the html file (page). I need a
  function that would get value in the
  input. I know that this can be done
  well through the DOM model, but I did
  not get to do it.</p>
</blockquote>
