Bugs item #1256551, was opened at 2005-08-11 02:36 Message generated for change (Tracker Item Submitted) made by Item Submitter 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. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1256551&group_id=16035 ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ dom4j-dev mailing list dom4j-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-dev