I feel that I'm missing something subtle here.
I have a $doc which I can see with $doc asText really contains the content of the page to be parsed. It came from dom parse -html5 $body.
From here, I'd like to interactively explore the DOM. For example, to get a list of anchors. It seems like $doc selectNodes {//a} would work*, but that doesn't return anything. Neither does anything else I try with selectNodes (/head, /body, /html ...nothing!). I can see that there are childNodes so the structure seems to be intact.
What is the better way to explore these nodes so I can figure out what is going wrong?
- https://wiki.tcl-lang.org/page/XPath - this is what I was trying to follow