hi..
How can I get the value of the "span" element.
Two separate values are required. (dataid="101" and dataid="102")
How can I get the values "615" and "715".
thanks...
How can I get the value of the "span" element.
Two separate values are required. (dataid="101" and dataid="102")
How can I get the values "615" and "715".
thanks...
B4X:
Dim st As String = $"
<div class="list-group">
<input type="checkbox" dataid="101" />
<a href="techno1">2023</a>
<span> 615 <a href="techno"><i class="fa fa-chevron-circle-right"></i></a></span>
</div>
<div class="list-group">
<input type="checkbox" dataid="102" />
<a href="techno2">2023</a>
<span> 715 <a href="techno"><i class="fa fa-chevron-circle-right"></i></a></span>
</div>
"$
Dim parser As MiniHtmlParser
parser.Initialize
Dim root As HtmlNode = parser.Parse(st)
Dim listgroup As HtmlNode = parser.FindNode(root, "div", parser.CreateHtmlAttribute("class", "list-group"))
If listgroup.IsInitialized Then
Dim span1 As HtmlNode = parser.FindNode(listgroup, "a", Null)
Log(parser.GetAttributeValue(span1, "href", ""))
End If
log(techno)