Victor Charles
asked on
Help with adding data elemnts from Fil2to File1 is doesn't already exist in File1 using VB.NET
Hi,
How do I add all data elements in File2 to File1. For example if File1 contains:
<Table1>
<ID>1</ID>
<DGG>C</DGG>
<NAS>D</NAS>
</Table1>
<Table1>
<ID>2</ID>
<DGG>C1</DGG>
<NAS>D1</NAS>
</Table1>
<Table1>
<ID>3</ID>
<DGG>C2</DGG>
<NAS>D2</NAS>
</Table1>
and File2 contains:
<Table2>
<NASC></NASC>
<AGD></AGD>
</Table2>
How do I create the following file:
<Table1>
<ID>1</ID>
<NASC></NASC>
<AGD></AGD>
<DGG>C</DGG>
<NAS>D</NAS>
</Table1>
<Table1>
<ID>2</ID>
<NASC></NASC>
<AGD></AGD>
<DGG>C1</DGG>
<NAS>D1</NAS>
</Table1>
<Table1>
<ID>3</ID>
<NASC></NASC>
<AGD></AGD>
<DGG>C2</DGG>
<NAS>D2</NAS>
</Table1>
Thanks,
Victor
How do I add all data elements in File2 to File1. For example if File1 contains:
<Table1>
<ID>1</ID>
<DGG>C</DGG>
<NAS>D</NAS>
</Table1>
<Table1>
<ID>2</ID>
<DGG>C1</DGG>
<NAS>D1</NAS>
</Table1>
<Table1>
<ID>3</ID>
<DGG>C2</DGG>
<NAS>D2</NAS>
</Table1>
and File2 contains:
<Table2>
<NASC></NASC>
<AGD></AGD>
</Table2>
How do I create the following file:
<Table1>
<ID>1</ID>
<NASC></NASC>
<AGD></AGD>
<DGG>C</DGG>
<NAS>D</NAS>
</Table1>
<Table1>
<ID>2</ID>
<NASC></NASC>
<AGD></AGD>
<DGG>C1</DGG>
<NAS>D1</NAS>
</Table1>
<Table1>
<ID>3</ID>
<NASC></NASC>
<AGD></AGD>
<DGG>C2</DGG>
<NAS>D2</NAS>
</Table1>
Thanks,
Victor
ASKER
Hi Fernando,
Thanks.
How do you add the data element only of it doesn't already exist in File1?
Victor
Thanks.
How do you add the data element only of it doesn't already exist in File1?
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
Thank You.
Not a problem Victor, glad to help.
Here, try this, it should do what you want.
Open in new window