Guest User

Untitled

a guest
May 27th, 2014
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.55 KB | None | 0 0
  1.     Public Function MergeXMLFiles(File1 As XElement, File2 As XElement)
  2.  
  3.         Dim File3 As XElement = File1
  4.  
  5.         For Each CurrElement In File2.Elements
  6.             Dim MatchFound As Boolean
  7.             For Each CurrElement2 In File1.Elements
  8.                 If (CurrElement.ToString = CurrElement2.ToString) Then
  9.                     MatchFound = True
  10.                 End If
  11.  
  12.             Next
  13.             If Not MatchFound Then
  14.                 File3.Add(CurrElement)
  15.             End If
  16.         Next
  17.         Return File3
  18.     End Function
Advertisement
Add Comment
Please, Sign In to add comment