I've submitted a fix for a similar problem in XMLWriter to James, so hopefully this one should be easy to fix.
> -----Original Message----- > From: Benjamin S. Scarlet [mailto:[EMAIL PROTECTED]] > Sent: 7. september 2002 04:14 > To: [EMAIL PROTECTED] > Subject: [dom4j-user] Namespace output problem > > > I think the output of the following snippet comes out wrong: > > > Document document = documentFactory.createDocument(); > Namespace n0 = new Namespace(null, "some:namespace"); > document.addElement(new QName("foo", n0)) > .addElement("bar"); > > System.out.println(document.asXML()); > > > When I run this, I get > <?xml version="1.0" encoding="UTF-8"?> > <foo xmlns="some:namespace"><bar/></foo> > > > What I expect is for the bar element to be <bar xmlns=""/>. > Since I created it > with no namespace, I expect it to be output so that if I read > it back in it > would again have no namespace. If I read this output back in, > it'll wind up > inheriting the foo tag's namespace. > > Ben > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same > old cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1> &refcode1=vs3390 > > > _______________________________________________ > dom4j-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/dom4j-user > ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user