Bugs item #1380249, was opened at 2005-12-14 10:06 Message generated for change (Comment added) made by kromo You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1380249&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: multiple empty namespace nodes 1.5 -> 1.6.1 Initial Comment: I have updated from dom4j 1.5.x to 1.6.1. In the document will be many empty namespace nodes if I execute this code: List namespaces = document.selectNodes("//namespace::*"); Map namespaceMap = new HashMap(namespaces.size()); for (Iterator i = namespaces.iterator(); i.hasNext();) { Namespace namespace = (Namespace) i.next(); namespaceMap.put(namespace.getPrefix(), namespace.getURI()); } XPath xPath = document.createXPath(xPathExpression); xPath.setNamespaceURIs(namespaceMap); ---------------------------------------------------------------------- Comment By: Victor (kromo) Date: 2006-02-03 00:22 Message: Logged In: YES user_id=1156663 Confirmed. I wanted to unset the default namespace by this method: public static void removeDefaultNamespace(final Document document) { final Element root = document.getRootElement(); root.add(Namespace.get("", "")); } The resulting document had two namespaces without prefix. ---------------------------------------------------------------------- Comment By: marc pellmann (marcpellmann) Date: 2005-12-15 11:46 Message: Logged In: YES user_id=1066225 Was submitted by me. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1380249&group_id=16035 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ dom4j-dev mailing list dom4j-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-dev