Closed sharpordie closed 1 year ago
Thank you for your kind words.
The goal was to have the XPath functionality part of the next major release of xml 7.0.0
. This unfortunately depends on the next major release of petitparser 6.0.0
, which brings improvements in error reporting and parsing speed. However the internal code changes go pretty deep, so dependencies that use internal infrastructure of PetitParser (implement custom parsers) need to be rewritten. Unfortunately there are quite a few of those on pub.dev and I am stuck.
A possibility would be to backport the XPath functionality to the last version that works with the currently released version of PetitParser, but this is a larger project ... (not necessarily technically, more on the side of managing the branches).
Dependency hell...
After analyzing my project's requirements. I found that I don't really need XPath.
I was mainly using simple XPath like //*[@id="locale.country"]
to get node and edit its attributes and text.
So I could replace this:
final element = document.xpath('//*[@id="locale.country"]');
With something like that:
final element = document.findAllElements('setting')
.where((setting) => setting.getAttribute('id') == 'locale.country');
Do you plan to release a new version soon? I tried installing from GitHub directly but there are issues with flutter_test.
Thank you very much for your impressive work. ;)