hi,
I am trying to parse this html code (feiertage) from https://www.ferienwiki.at/feiertage/2025/at, but it fails with error code:
minihtmlparser._gettextfromnode (java line: 301)
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
....
For Each td As HtmlNode In tds
HtmlParser.PrintNode(td)
Next
Step 2:
B4X:
For i = 0 To trs.Size -1
Dim tds As List = HtmlParser.FindDirectNodes(trs.Get(i), "td", Null)
For Each td As HtmlNode In tds
Dim TextNode As HtmlNode
Dim a As HtmlNode = HtmlParser.FindNode(td, "a", Null)
If a.IsInitialized Then
TextNode = a
Else
Dim span As HtmlNode = HtmlParser.FindNode(td, "span", Null)
If span.IsInitialized Then
TextNode = span
Else
TextNode = td
End If
End If
Log(HtmlParser.GetTextFromNode(TextNode, 0))
Next
Next