Bugs item #1256551, was opened at 2005-08-11 02:36 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1256551&group_id=16035
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: set default Namespace results in wrong xml output Initial Comment: A short code fragment illustrate the bug: Document document = DocumentFactory.getInstance(). createDocument(); Element root = document.addElement("root"); document.setRootElement(root); root.addNamespace("", "http://www.test.com/yaf"); root.addElement("child"); StringWriter strWriter = new StringWriter(); XMLWriter writer = new XMLWriter(strWriter, new OutputFormat("\t", true, "ISO-8859-1")); writer.write(document); writer.flush(); writer.close(); System.out.println(strWriter.getBuffer().toString()); Result: <?xml version="1.0" encoding="ISO-8859-1"?> <root xmlns="http://www.test.com/yaf"> <child xmlns=""/> </root> Now the question (bug) is: Why conains the element 'child' the (empty*) attribute 'xmlns'? * Empty means no value is assigned. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2006-10-12 02:47 Message: Logged In: NO No one answer? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1256551&group_id=16035 ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ dom4j-dev mailing list dom4j-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-dev