On Sat, 2004-09-18 at 04:51, Bill Riegel wrote: > > > expect to see > > > > <DataSet xmlns="someNameSpace"> >
You need to explicitly add xmlns declarations to the DOM you are building as well as creating the elements in the correct namespace. Yes this is somewhat clumsy; DOM level 3 has some features that improve the situation somewhat but with DOM level 2 you definitely need to do the following to force an "xmlns:msg=...." declaration to be output on the <foo> tag. I expect some variant of this can be used to output a "default namespace" declaration, ie "xmlns=....". // NS_MYMSG = "http://www.acme.com/namespaces/mymessage"; // NS_XMLNS="http://www.w3.org/2000/xmlns/"; Element foo = doc.createElementNS(NS_MYMSG, "msg:foo"); foo.setAttributeNS(NS_XMLNS, "xmlns:msg", NS_MYMSG); I suggest you search the mail archives for "serialization". There were two email threads on this topic just last week. Regards, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]