Sub Process_Globals
Private HtmlParser As MiniHtmlParser
Type Link (Name As String, Data As String)
End Sub
Sub AppStart (Args() As String)
FindLink
End Sub
Sub FindLink
HtmlParser.Initialize
Dim txt As String = $"<A HREF="UID50B">Source</A>Task<A HREF="UIDD03">Name</A>"$
Dim root As HtmlNode = HtmlParser.Parse(txt)
Dim links As List
links.Initialize
Dim nodes As Int = root.Children.Size
For i = 0 To nodes - 1
Dim node As HtmlNode = root.Children.Get(i)
Dim lnk As Link
lnk.Initialize
Select node.Name
Case "A"
lnk.Name = HtmlParser.GetTextFromNode(node, 0)
lnk.Data =HtmlParser.GetAttributeValue(node,"HREF","value")
Case "text"
lnk.Name = HtmlParser.GetAttributeValue(node, "value", "")
lnk.Data = ""
End Select
links.Add(lnk)
Next
links.SortType("Data",True)
End Sub