I’m trying to automatically decorate some html:
<svg>
<polygon points=“5 10, -3 7” />
</svg>
When I try to access this in the syntax tree enter() iterator it gives me the node type but for the life of me I can’t figure out how to get the tag name
and attribute name
and attribute value
.
I guess what I’m hoping for is something like an AST for this html block where I can easily extract:
- TagName
- AttributeName
- PointPairing type (like if I wanted to decorate all coordinates in html)
I looked at elementName
in the Lang-html package as one option to extract this from the tree.
Any ideas?