Hi jonty thanx for your reply. Let me show you what I want.
File1.xml
<?xml version="1.0"?>
<root>
<object ID ="1" name = "abc" price = "0"/>
<object ID ="2" name = "def" price = "430"/>
<object ID ="3" name = "abc" price = "350"/>
<object ID ="4" name = "def" price = "3000"/>
<object ID ="5" name = "jkl" price = "130"/>
<object ID ="6" name = "abc" price = "230"/>
</root>
****************************************************
File2.xml
<?xml version="1.0"?>
<root>
<object ID ="1" name = "abc" price = "0"/>
<object ID ="2" name = "def" price = "430"/>
<object ID ="4" name = "defijk" price = "3000"/>
<object ID ="50" name = "jkl" price = "130"/>
<object ID ="7" name = "abc" price = "2"/>
<object ID ="17" name = "xyz" price = "2"/>
</root>
***********************************************
result.xml
<?xml version="1.0"?>
<root>
<object ID ="1" name = "abc" price = "0"/>
<object ID ="2" name = "def" price = "430"/>
</root>
So as you can see, only those elements are retained whose attributes exactly matched in value...
I think that will help explain the problem....
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.