add namespace to java dom attribute
<p>I am trying to create an attribute with a namespace prefix. The following code does not seem to work:</p>

<pre><code>Element newData = docFromXML.createElement("Data");
Attr typeAttr = docFromXML.createAttributeNS(namespaceContext.getNamespaceURI("ss"), "type");
typeAttr.setValue("String");
newData.setAttributeNode(typeAttr);
</code></pre>

<p>I expect the following:</p>

<pre><code>&lt;Data ss:type="String"&gt;&lt;/Data&gt;
</code></pre>

<p>But the following is produced:</p>

<pre><code>&lt;Data type="String"&gt;&lt;/Data&gt;
</code></pre>

<p>How do I explicitely add the namespace prefix "ss". The getNamespaceURI function returns the URL for the ss prefix in the DOM.</p>
