Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have two nodelists which has some common elements in it.

I need to get all the common elements from the two nodelists and put it in another nodelist.

How can this be done using DOM parsing strategy ? Please help me out.
Posted

1 solution

Read each XML-File: http://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/[^]

put them in new XML-File: http://www.mkyong.com/java/how-to-create-xml-file-in-java-dom/[^]

You might want to add all nodes to a list, so you can sort them before writing the new XML File: http://programmatica.blogspot.de/2006/12/sorting-xml-in-java.html[^]

have fun!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900