Live data from Hacker News

Ask HN: Does Anybody Use XQuery?

news.ycombinator.com

1–5 of 5 posts

Ask HN: Does Anybody Use XQuery?

#1
I am currently working on where I plan to do configuration through xml file and it got me me thinking "I could learn XQuery and use it." Since XQuery is at least by my understanding "SQL for XML". But when looking for ways to use it. I thought "Does anybody actually use it?" and "How off am I actually understanding it?"

Re: Ask HN: Does Anybody Use XQuery?

#4
XQuery is pretty powerful, and I used it extensively with xlst in the 2000s, but it's a dead tech and not something you should ask your users to use.

Just use JSON.

Also, if you absolutely insist on using it, do not use namespaces, and avoid attributes. All us older timers could tell you about the number of frustrating XML configs we had to deal with that had overcomplicated or completely irrational structures. And namespaces and attributes were the biggest offenders.

Re: Ask HN: Does Anybody Use XQuery?

#5
Well, I don't use it right now. But really Xquery is a great language and you can do lots of things. I used it with XSLT a lot. I am still forcing myself to find the correct query for jq when I want to look through a JSON. Xquery felt well defined.