This, thirty years later, is the best pitch for XML I’ve read. Essentially, it’s a slow moving, standards-based approach to data interoperability. I hated it the minute I learned about it, because it missed something I knew I cared about, but didn’t have a word for in the 90s - developer ergonomics. XML sucks shit for someone who wants to think tersely and code by hand. Seriously, I hate it with a fiery passion. Happ…
XML is a big improvement over YAML. There, I said it.
Xee: A Modern XPath and XSLT Engine in Rust
151–160 of 245 posts
Re: Xee: A Modern XPath and XSLT Engine in Rust
#152I hope this will be packaged into shared libraries at some point so that languages that isn't rust will get access to it.
Re: Xee: A Modern XPath and XSLT Engine in Rust
#153Earlier quoted context omitted.
JQ is the most feature-rich of the bunch. It's defacto standard and I usually just default to it because it offers so much - assignment, various builtins such as base64 encoding. The disadvantage is that it's not easily embeddable in your own programs - so programs use JSONPath / Go templates often.
I also don't think there's a specification written for the jq query language, unlike https://jmespath.org/ , which as you mentioned also has more client libraries. I too am probably going to embed jmespath in my app.I need it to allow users to fill CLI flags from config files, and it'll replace my crappy homegrown version ( https://github.com/bbkane/warg/blob/740663eeeb5e87c9225fb627... )
Re: Xee: A Modern XPath and XSLT Engine in Rust
#154There are many humongous XML sources. E.g. the Wikipedia archive is 42GB of uncompressed text. Holding a fully parsed representation of it in memory would take even more, perhaps even >100GB which immediately puts this size of document out of reach. The obvious solution is streaming, but streaming appears to not be supported, though is listed under Challenging Future Ideas: https://github.com/Paligo/xee/blob/main/ide…
"How hard is it to implement XML/XSLT/XPATH streaming?" It's actually quite annoying on the general case. It is completely possible to write an XPath expression that says to match a super early tag on an arbitrarily-distant further tag. In another post in this thread I mention how I think it's better to think of it as a multicursor, and this is part of why. XPath doesn't limit itself to just "descending", you can fre…
Re: Xee: A Modern XPath and XSLT Engine in Rust
#155Earlier quoted context omitted.
I just pulled the 100GB number out of nowhere, I have no idea how much overhead parsed xml consumes, it could be less or it could be more than 2.5x (it probably depends on the specific document in question). In any case I don't have $1500 to blow on a new computer with 100GB of ram in the unsubstantiated hope that it happens to fit, just so I can play with the Wikipedia data dump. And I don't think that's a reasonabl…
Xml and textual formats in general are ill suited to such large documents. Step 1 should really be to convert and/or split the file into smaller parts.
Re: Xee: A Modern XPath and XSLT Engine in Rust
#156Earlier quoted context omitted.
>XML has always seemed to be a data standard which is intended to be what computers prefer, not people Interesting take, but I'm always a little hesitant to accept any anthropomorphizing of computer systems. Isn't it always about what we can reason and extrapolate about what the computer is doing? Obviously computers have no preference so it seems like you're really saying "XML is a poor abstraction for what it's try…
Re xslt based web applications - a team at my employer did the same circa 2004. It worked beautifully except for one issue: inefficiency. The qps that the app could serve was laughable because each page request went through the xslt engine more than once. No amount of tuning could fix this design flaw, and the project was killed. Names withheld to protect the guilty. :)
Re: Xee: A Modern XPath and XSLT Engine in Rust
#157Earlier quoted context omitted.
"This, thirty years later, is the best pitch for XML I’ve read." I wish someone would write "XML - The Good Parts" . Others might argue that this is JSON but I'd disagree: - No comments is a non-starter - No proper integers - No date format - Schema validation is a primitive toy compared what we had for XML - Lack of allowed trailing commas YAML ain't better. I hated whitespace handling in XML, it's a miracle how YAM…
It's funny to hear people in the comments here talk about XML in the past tense. I know it's passé in the web dev world, but in my work we still work with XML all the time. We even have work in our queue to add support for new data sources built on XML (specifically QIF https://qifstandards.org/ ). It's fine with me... I've come to like XML. It's nice to have a standard, easy way to do seschemas, validators, processo…
In my military work, I've heard the senior project managers refer to a modern battleship as a floating XML document.
Re: Xee: A Modern XPath and XSLT Engine in Rust
#158Earlier quoted context omitted.
"How hard is it to implement XML/XSLT/XPATH streaming?" It's actually quite annoying on the general case. It is completely possible to write an XPath expression that says to match a super early tag on an arbitrarily-distant further tag. In another post in this thread I mention how I think it's better to think of it as a multicursor, and this is part of why. XPath doesn't limit itself to just "descending", you can fre…
Would it be possible to transform a large XML document into something on-disk that could be queried like a database by the XPath evaluator?
Re: Xee: A Modern XPath and XSLT Engine in Rust
#159Earlier quoted context omitted.
Well, it's not as if this is the first free alternative. Here is a wonderful, incredibly powerful tool, not written in Java, but in Free Pascal, which is probably too often underestimated: Xidel[1]. Just have a look at the features and check its Github page[2]. I've often been amazed at its capabilities and, apart from web scraping, I mainly use it for XQuery executions - so far the latest version 0.9.9 has also impl…
Forget to add, for latest XQuery up to 4.0, there is also BaseX [1] — this time a Java program. It has a great GUI/IDE for XQuery rapid prototyping. [1] https://basex.org/basex/xquery/
Re: Xee: A Modern XPath and XSLT Engine in Rust
#160It's interesting to see the slow rehabilitation of XML and its tooling now that there's a new generation of developers who have not grown up in the shadow of XML's prime in the late 90s / early 2000s, and who have not heard (or did not buy into) the anti-XML crowd's ranting --- even though some of their criticisms were legitimate. I've always liked XML, and especially XPath, and even though there were a large number…
The vast vast majority of Devs only experience of XML is what they hear second hand, I'm sure a lot more would like it if they tried it.