title: Problems setting a new node value in java, dom, xml parsing
body: <p>I have the following code:</p>
  
  <pre><code>DocumentBuilder dBuilder = dbFactory_.newDocumentBuilder();
  StringReader reader = new StringReader(s);
  InputSource inputSource = new InputSource(reader);
  Document doc_ = dBuilder.parse(inputSource);
  </code></pre>
  
  <p>and then I would like to create a new element in that node right under the root node with this code:</p>
  
  <pre><code>Node node = doc_.createElement("New_Node");
  node.setNodeValue("New_Node_value");
  doc_.getDocumentElement().appendChild(node);
  </code></pre>
  
  <p>The problem is that the node gets created and appended but the value isn't set. I don't know if I just can't see the value when I look at my xml if its hidden in some way but I don't think that's the case because I've tried to get the node value after the create node call and it returns <code>null</code>.
  I'm new to xml and dom and I don't know where the value of the new node is stored. Is it like an attribute?</p>
  
  <pre><code>&lt;New_Node value="New_Node_value" /&gt;
  </code></pre>
  
  <p>or does it put value here:</p>
  
  <pre><code>&lt;New_Node&gt; New_Node_value &lt;/New_Node&gt;
  </code></pre>
  
  <p>Any help would be greatly appreciated,</p>
  
  <p>Thanks, Josh</p>