The example I gave is actually irrelevant... I just put that together off the fly to illustrate the basic problem.
- James Snell Software Engineer, Internet Emerging Technologies, IBM James M Snell/Fresno/IBM - [EMAIL PROTECTED] These things I have spoken to you, so that in Me you may have peace. In the world you have tribulation, but take courage; I have overcome the world. - John 16:33 Please respond to [EMAIL PROTECTED] To: <[EMAIL PROTECTED]>, Matthew Duftler/Watson/IBM@IBMUS, Sam Ruby/Raleigh/IBM@IBMUS cc: Subject: Re: Bug with DOM2Writer I was just noticing something in James' original note: > Example, let's say I want to create the following XML output: > > <s:test xmlns:s="testing> > <hello /> > </s:test> > > To do so, I use the following code. > > Document doc = ... create document > Element test = doc.createElementNS("testing", "test"); > test.setPrefix("s"); > test.setAttribute("xmlns:s", "testing"); > Element hello = doc.createElementNS("testing", "hello"); > test.appendChild(hello); > doc.appendChild(test); > > Run this through the DOM2Writer, and the output is: > > <s:test xmlns:s="testing" xmlns:s="testing"> > <hello /> > </s:test> You seem to be attempting to create the "hello" element in the {testing} namespace. Is that the case? If so your XML serialization is still incorrect - it should say: <s:test xmlns:s="testing" xmlns:s="testing"> <s:hello /> </s:test> Which one did you want to have come out? Sanjiva.