Last post Oct 14, 2014 10:56 PM by Fei Han - MSFT
Oct 14, 2014 02:12 AM|RamThilak|LINK
Following is my code to receive a xml file as string.I want to change it by receiving multiple xml files and process it .how do i check whether the received string has multiple xml files?
Public Function read(str As String) As String
Dim ds As New DataSet
Catch ex As Exception
Oct 14, 2014 10:56 PM|Fei Han - MSFT|LINK
Thanks for your post.
I want to change it by receiving multiple xml files and process it .how do i check whether the received string has multiple xml files?
As for your problem, you could use some specific delimiters to separates multiple xml files as string.
For example: use space character (“ ”) to separates strings
Dim xmlfiles As String = "TestData0.xml TestData1.xml TestData2.xml"
Then we could use the Split function to split strings with delimiter as below.
Dim filesArray() As String = Split(xmlfiles)
Finally, loop through filesArray to do some operation.
Dim file As String = ""
For i As Integer = 0 To filesArray.Length - 1
file = filesArray(i).ToString()
For more information about Split Function, please refer to the following link.
If you have any question about my reply, please let me know freely.