|
|
|
|
|
by mdaniel
1314 days ago
|
|
I actually tried the lxml syntax "/{urn:beta}b" and that's how I learned about the panic-based error handling, but I didn't know about that Q syntax, so thank you for bringing it to my attention $ echo '<a xmlns="urn:alpha">hello</a>' | xq --xpath '/Q{urn:alpha}a/text()'
panic: /Q{urn:alpha}a/text() has an invalid token.
goroutine 18 [running]:
github.com/antchfx/xmlquery.Find(...)
github.com/antchfx/xmlquery@v1.3.8/query.go:76
...
It seems to be a problem with that backing xmlquery library, and I did a quick GitHub topics search and found https://github.com/zzossig/rabbit which claimed to be XPath 3, but then https://github.com/zzossig/rabbit#what-is-not-supported says "lol, namespaces, wat?" so :-( |
|