Re: [dom4j-user] removing namespace
You will have to remove and set the namespace for each node in the tree. This is a limitation/functionality of all of the XML Object Models at the moment. I agree that this is not 'intuitive' and not in line with how you specify a namespace in a XML document, where the namespace gets inherited by default. Kind regards, Edwin Dankert 2009/11/14 Yevgeniy Belman : > found this post. It definitely works, but is this the desired approach? > http://www.mail-archive.com/[email protected]/msg01591.html > > > > On Fri, Nov 13, 2009 at 4:41 PM, Yevgeniy Belman wrote: >> >> Hi, I'm using dom4j to parse and map xml docs and could really use some >> help with 1.6.1 library. When i do an Element.remove(Namespace), the >> namespace does not get removed. Here's a snippet where i am trying to remove >> xmlns from the NbOfTxnPerSts element. It is not working for me. Any ideas? >> >> Element stat... >> Element pain997... >> >> stat.detach(); >> stat.remove(stat.getNamespace()); >> System.out.println(stat.asXML()); >> pain997.add(stat); >> >> >> 1 >> ACTC >> > > > -- > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > ___ > dom4j-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/dom4j-user > > -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ dom4j-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dom4j-user
Re: [dom4j-user] removing namespace
found this post. It definitely works, but is this the desired approach? http://www.mail-archive.com/[email protected]/msg01591.html On Fri, Nov 13, 2009 at 4:41 PM, Yevgeniy Belman wrote: > Hi, I'm using dom4j to parse and map xml docs and could really use some > help with 1.6.1 library. When i do an Element.remove(Namespace), the > namespace does not get removed. Here's a snippet where i am trying to remove > xmlns from the NbOfTxnPerSts element. It is not working for me. Any ideas? > > Element stat... > Element pain997... > > stat.detach(); > stat.remove(stat.getNamespace()); > System.out.println(stat.asXML()); > pain997.add(stat); > > > 1 > ACTC > > -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ dom4j-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dom4j-user
[dom4j-user] removing namespace
Hi, I'm using dom4j to parse and map xml docs and could really use some help with 1.6.1 library. When i do an Element.remove(Namespace), the namespace does not get removed. Here's a snippet where i am trying to remove xmlns from the NbOfTxnPerSts element. It is not working for me. Any ideas? Element stat... Element pain997... stat.detach(); stat.remove(stat.getNamespace()); System.out.println(stat.asXML()); pain997.add(stat); 1 ACTC -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july___ dom4j-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dom4j-user
