title: How to append xml nodes (as a string) into an existing XML Element node (only using java builtins)?
body: <p>(Disclaimer: using Rhino inside RingoJS)</p>
  
  <p>Let's say I have a document with an element , I don't see how I can append nodes as string to this element. In order to parse the string to xml nodes and then append them to the node, I tried to use documentFragment but I couldn't get anywhere. In short, I need something as easy as .NET's .innerXML but it's not in the java api.</p>
  
  <pre><code>var dbFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();
  var dBuilder = dbFactory.newDocumentBuilder();
  var doc = dBuilder.newDocument();
  var el = doc.createElement('test');
  var nodesToAppend = '&lt;foo bar="1"&gt;Hi &lt;baz&gt;there&lt;/baz&gt;&lt;/foo&gt;';
  el.appendChild(???);
  </code></pre>
  
  <p>How can I do this without using any third party library ?</p>
  
  <p>[EDIT] It's not obvious in the example but I'm not supposed to know the content of variable 'nodesToAppend'. So please, don't point me to tutorials about how to create elements in an xml document.</p>