A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
video training course this week in the
XML and Related Technologies
Remove duplicate nodes in DOM
Joined: Sep 09, 2008
Jul 06, 2011 01:44:25
I am using the DOM API for a random XML operation and have a NodeList which contains the following 3 nodes (All element nodes):
<abc> <def>1</def> </abc> <abc> <def>2</def> </abc> <abc> <def>1</def> </abc>
In this list, I want to remove the duplicate node i.e. Node number 3. Does any one have any clues on how can I do the same?
Thanks in advance.
Author and all-around good cowpoke
Joined: Mar 22, 2000
Jul 06, 2011 07:45:29
The org.w3c.dom.Node interface provides the removeChild method - have you tried that?
I agree. Here's the link:
subject: Remove duplicate nodes in DOM
XML DOM & children nodes
node() test condition
Why is this happening?
Java XML DOM Parsing
About parsing with DOM ...
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015