Evaluate possibility of rewriting our XPath queries to CSS selectors
Checklist
- [X] I read and understood ASF's Contributing guidelines
- [X] I also read Setting-up and FAQ, I don't need help, this is an enhancement idea
- [X] This is not a duplicate of an existing issue
- [X] My idea doesn't duplicate existing ASF functionality described on the wiki
- [X] I believe that my idea falls into ASF's scope and should be offered as part of ASF built-in functionality
- [X] My idea doesn't violate the Steam Subscriber Agreement
- [X] My idea doesn't violate the Steam Online Conduct
- [X] This is not ASF-ui suggestion
Enhancement purpose
Aw sh*t, here we go again...
The history of ASF using XPath is dated back to 2015, when we've used HtmlAgilityPack for parsing HTML files.
It was a very good decision back then, and still is, but since then AngleSharp was released, which turned out to be much more versatile and performant solution. Together with AngleSharp.XPath, rewriting ASF from HAP to AngleSharp turned out much easier than expected.
Solution
As part of further ASF upgrades, we should evaluate whether it's possible to rewrite our XPaths used in ASF to native mechanism provided by AngleSharp, which is CSS selectors exclusively, so we can eventually deprecate usage of AngleSharp.XPath and eventually remove it from the ASF core entirely.
Why currently available solutions are not sufficient?
It's good as it is, however, XPath is community library that extends AngleSharp with features that are not maintained officially. Using native AngleSharp mechanisms will allow us to drop a dependency and improve compatibility with upstream.
Can you help us with this enhancement idea?
Yes, I can code the solution myself and send a pull request
Additional info
No response