Hi,
I get '*CaptionText in my code. Now I want Text ' * Last Update 14/01/2022 09:58:03' that nextline of <br> tag by using MiniHtmlParser.
Thanks.
I get '*CaptionText in my code. Now I want Text ' * Last Update 14/01/2022 09:58:03' that nextline of <br> tag by using MiniHtmlParser.
Thanks.
B4X:
Sub AppStart (Args() As String)
Dim s As String = $"
<body>
<table class="table-info">
<caption style="text-align: right;">
<span class="set-color-gray set-color-graylight">* CaptionText </span><br>
* Last Update 14/01/2022 09:58:03
</caption>
' *******
</table>
</body>"$
Dim HtmlParser As MiniHtmlParser
HtmlParser.Initialize
Dim root As HtmlNode = HtmlParser.Parse(s)
Dim Table As HtmlNode = HtmlParser.FindNode(root, "table", HtmlParser.CreateHtmlAttribute("class", "table-info"))
If Table.IsInitialized Then
Dim caption As List = HtmlParser.FindDirectNodes(Table, "caption", Null)
For i = 0 To caption.Size - 1
Dim spans As List = HtmlParser.FindDirectNodes(caption.Get(i), "span", Null)
For Each span As HtmlNode In spans
Log(HtmlParser.GetTextFromNode(span, 0))
Next
Next
Else
Log("not found!!!")
End If
End Sub