On Mon, 26 Mar 2001, hans steen wrote:
> Can anyone tell me what is wrong.
> I'm using Xerces to make an Document-object in this way:
>
> doc= new DocumentImpl();
> Element root = doc.createElement("dices:nshans");
> root.setAttribute("xmlns:dices", "http://www.hans.com");
>
> Element item = doc.createElement("dices:result");
> item.appendChild(doc.createTextNode("value"));
> root.appendChild(item);
>
> doc.appendChild( root );
I'm not sure this will create the correctly namespaced elements. Try
doing:
Element root = doc.createElementNS("http://www.hans.com", "dices:nshans");
Element item = doc.createElementNS("http://www.hans.com", "dices:result");
to create the elements.
Ian
--
Ian Roberts, Software Engineer DecisionSoft Ltd.
Telephone: +44-1865-203192 http://www.decisionsoft.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]