Hi, Even this is not working as you can see in the xml. The Childs have xmlns " <?xml version="1.0" encoding="ISO-8859-1"?>
<root xmlns="http://www.w3.org/2001/06/grammar"> <author xmlns="" name="Toby" location="Germany">Tobias Rademacher</author> <author xmlns="" name="James" location="UK">James Strachan <book name="James" location="UK">James bond</book> </author> </root> " I am also attaching the java file. If you all can, please try to modify the java file and send me the solution. Your help will be highly appreciated. The only requirement is that xmlns should not come in child elements ( i.e in <author) Regards Kirti -----Original Message----- From: Edwin Dankert [mailto:[EMAIL PROTECTED] Sent: Thursday, August 03, 2006 2:49 PM To: Kirti Girdhar Cc: Evan Kirkconnell; dom4j-user@lists.sourceforge.net Subject: Re: [dom4j-user] help requied in Namespace problem This on it's own doesn't work at the moment: elem.setQName(QName.get( elem.getName(), ns)); So you'll first have to remove the previous namespace: elem.remove(elem.getNamespace()); elem.setQName(QName.get(elem.getName(), ns)); Regards, Edwin -- http://www.edankert.com/
CreateNewFile.java
Description: CreateNewFile.java
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user