You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to have a basic tutorial which shows how to iterate over nodes which match a given XPath? I didn't find anything in the tests that detail that. Thanks.
The text was updated successfully, but these errors were encountered:
var list = xmlpath.MustCompile("//li")
var root, err = xmlpath.ParseHTML(b)
if err != nil {
fmt.Println(err)
}
var iter = list.Iter(root)
for iter.Next() {
ele := iter.Node().String()
fmt.Println(strings.TrimSpace(ele))
}
Would it be possible to have a basic tutorial which shows how to iterate over nodes which match a given XPath? I didn't find anything in the tests that detail that. Thanks.
The text was updated successfully, but these errors were encountered: