Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within XML
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Paul Clapham
Ron McLeod
Jeanne Boyarsky
Tim Cooke
Sheriffs:
Liutauras Vilda
paul wheaton
Henry Wong
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Carey Brown
Frits Walraven
Bartenders:
Piet Souris
Himai Minh
Forum:
XML and Related Technologies
Remove duplicate nodes in DOM
Ankit Nagpal
Ranch Hand
Posts: 47
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
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.
Ankit
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The org.w3c.dom.Node interface provides the removeChild method - have you tried that?
Bill
Everybody's invited. Even this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
XML DOM & children nodes
node() test condition
Why is this happening?
Java XML DOM Parsing
About parsing with DOM ...
More...