Git Product home page Git Product logo

Comments (3)

maximbaz avatar maximbaz commented on May 30, 2024

As an idea, parsing could be offloaded to a tool like himalaya or html-parse-stringify or similar, and then all you need to do is to pipe the result to jq like you already do for other tools 🙂

from yq.

kislyuk avatar kislyuk commented on May 30, 2024

Thanks for your interest. I probably will not support this. For XML, I rely on https://github.com/martinblech/xmltodict, which uses expat, which does not do well parsing HTML. I am unlikely to switch away from xmltodict, and I value its use of expat (because it's in the Python standard library). (In addition, I am likely to discontinue tq, because I find TOML not to be useful and am not aware of many users.)

You might consider using LXML to parse your HTML, then adapting xmltodict to use it, or use LXML's suggested recipe: https://lxml.de/FAQ.html#how-can-i-map-an-xml-tree-into-a-dict-of-dicts. If you find an elegant way to integrate that on top of yq, with LXML as an optional dependency, I'd be open to a PR.

from yq.

Gerst20051 avatar Gerst20051 commented on May 30, 2024

There is also https://github.com/sibprogrammer/xq

from yq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.