first read the file content to a variable string.
then find the tag <raw_text> save its position on the string.
next find </raw_text>, save it's position on the string.
then using mid() function extract the string within.
split the string you extracted and put it to your
textbox:
Code:
Dim objFSO As Object 'Scripting.FileSystemObject
Dim objText As As Object 'Scripting.TextStream
Dim strContent As String
Dim Pos1 As Integer
Dim Pos2 As Integer
Dim var As Variant
Set ObjFSO = CreateObject("Scripting.FileSystemObject")
Set objText = objFSO.OpenTextFile("D:\theXMLFileHere.xml", ForReading)
strContent = objText.ReadAll()
Pos1=Instr(1, strContent, "<raw_text>")
If Pos1 <> 0 Then
Pos1=Pos1 + Len("<raw_text>")
Pos2 = Instr(Pos1, strContent, "</raw_text>")
If Pos2 <> 0 Then
strContent = Mid(strContent, Pos1, Pos2 - Pos1)
While Instr(strContent, " ")
strContent = Replace(strContent, " ", " ")
Wend
var = Split(strContent, " ")
[YourTextbox1] = var(0)
[YourTextbox2] = var(1)
[YourTextbox3] = var(3)
...
...
End If
End If
Set ObjText=Nothing
Set ObjFSO = Nothing