GithubHelp home page GithubHelp logo

Comments (4)

ohler55 avatar ohler55 commented on June 18, 2024

I would prefer to enhance the locate() and alocate() methods to support searching or filtering on Class as well as the current behavior. The text() method was a shortcut only because it is used so often. Other types are less frequently used from my experience. Have you looked at the locate() method on the Element class? What are you thoughts on expanding locate to handle Classes?

from ox.

ohler55 avatar ohler55 commented on June 18, 2024

I checked in some code for a 1.9.0 candidate. If you want the elements of a doc then try this

doc.locate('^Element')

comments try

doc.locate('^Comment')

from ox.

ohler55 avatar ohler55 commented on June 18, 2024

Please take a look at the changes. If you think it satisfies what you need close the issue. If I don't see a response I will assume the changes satisfy the issue.

from ox.

paulvt avatar paulvt commented on June 18, 2024

Ok, thanks for adding this. I haven't gotten around to change my application to use/test this yet, and I was waiting with a response for until after I used it. However, it looks good, thanks for adding this!

I miust admit I still like separate methods more coming from REXML (or both) as methods are cheap and make the code more readable, but I get it if you want to keep the API small.

from ox.

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.