Victor Charles
asked on
Help with deleting records in File2 when no matching records in both File1 and File2
Hi,
How do I delete records in File2 if the values of two match fields (Receiver, AGD) are not identical? For example when I compare the first two files below, how do I obtain File3.xml which contains data from File2.xml?
File1.xml
Victor
How do I delete records in File2 if the values of two match fields (Receiver, AGD) are not identical? For example when I compare the first two files below, how do I obtain File3.xml which contains data from File2.xml?
File1.xml
<?xml version="1.0" encoding="utf-8"?>
<Root>
<Table1>
<Link_ID>1</Link_ID>
<Receiver>USA</Receiver>
<AGD>XXX</AGD>
<NSC>FFF</NSC>
<FCT>UUU</FCT>
</Table1>
<Table1>
<Link_ID>2</Link_ID>
<Receiver>BEL</Receiver>
<AGD>XXX</AGD>
<NSC>GGG</NSC>
<FCT>HHH</FCT>
</Table1>
<Table1>
<Link_ID>3</Link_ID>
<Receiver>ESP</Receiver>
<AGD>XXX</AGD>
<NSC>EEE</NSC>
<FCT>PPP</FCT>
</Table1>
<Table1>
<Link_ID>4</Link_ID>
<Receiver>ROU</Receiver>
<AGD>VVV</AGD>
<NSC>EEE</NSC>
<FCT>PPP</FCT>
</Table1>
<Table1>
<Link_ID>5</Link_ID>
<Receiver>POL</Receiver>
<AGD>XXX</AGD>
<NSC>EEE</NSC>
<FCT>PPP</FCT>
</Table1>
</Root>
File2.xml <?xml version="1.0" encoding="utf-8"?>
<Root>
<Table2>
<Link_ID>1</Link_ID>
<Receiver>DEU</Receiver>
<AGD>LLL</AGD>
<NSC>FFF</NSC>
<FCT>UUU</FCT>
</Table2>
<Table2>
<Link_ID>2</Link_ID>
<Receiver>BEL</Receiver>
<AGD>XXX</AGD>
<NSC>GGG</NSC>
<FCT>HHH</FCT>
</Table2>
<Table2>
<Link_ID>3</Link_ID>
<Receiver>ESP</Receiver>
<AGD>XXX</AGD>
<NSC>EEE</NSC>
<FCT>PPP</FCT>
</Table2>
</Root>
File3.xml <?xml version="1.0" encoding="utf-8"?>
<Root>
<Table2>
<Link_ID>1</Link_ID>
<Receiver>DEU</Receiver>
<AGD>LLL</AGD>
<NSC>FFF</NSC>
<FCT>UUU</FCT>
</Table2>
</Root>
Thanks,Victor
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Fernando,
It works.
Thank You.
Victor
It works.
Thank You.
Victor
ASKER