All good ?
Hopefully this helps, let me know if you need any clarifications.
Code:
Set objFileToRead = CreateObject("Scripting.FileSystemObject").OpenTextFile("C:\testme.txt",1)
strFileText = objFileToRead.ReadAll()
objFileToRead.Close
Set objFileToRead = Nothing
ToolNode = Split(Trim(Split(Split(strFileText,"<TOOL>")(1),"</TOOL>")(0)),vbNewLine)
BookNode = Split(Trim(Split(Split(strFileText,"<BOOK>")(1),"</BOOK>")(0)),vbNewLine)
For intBCounter = Lbound(BookNode) to Ubound(BookNode)
If Len(BookNode(intBCounter)) <> 0 Then
msgbox Split(BookNode(intBCounter),"</")(0)
End If
Next
For intTCounter = Lbound(ToolNode) to Ubound(ToolNode)
If Len(ToolNode(intTCounter)) <> 0 Then
msgbox Split(ToolNode(intTCounter),"</")(0)
End If
Next
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.