没看懂你想做什么
Dim dlg As new OpenFileDialog
If dlg.ShowDialog = DialogResult.OK Then
Dim txt As String = FileSys.ReadAllText(dlg.FileName, Encoding.Default)
Dim idx As Integer = txt.IndexOf("</business>")
Dim s1 As String = txt.SubString(0, idx+11)
Dim s2 As String = txt.SubString(idx+12)
msgbox(s1)
msgbox(s2)
Dim xmlDoc As New System.XML.XmlDocument
xmlDoc.Loadxml(s1)
Dim ndList = xmlDoc.GetElementsByTagName("input")
For i As Integer = 0 To ndList.count - 1
Dim fphm As String = ndList(i).Item("fphm").InnerText
msgbox(fphm)
Dim xhdwmc As String = ndList(i).Item("xhdwmc").InnerText
msgbox(xhdwmc)
Next
End If
[此贴子已经被作者于2016/7/25 16:34:47编辑过]