11

Does anyone know a library that allows DOM traversing in strings using a jquery like selector engine?

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Bakaburg
  • 3,165
  • 4
  • 32
  • 64
  • 2
    Most of the 3rd party libs given in [Best Methods to parse HTML](http://stackoverflow.com/questions/3577641/best-methods-to-parse-html/3577662#3577662) can do that. On a sidenote, they are not *jQuery selectors* but [W3C selectors](http://www.w3.org/TR/CSS2/selector.html) – Gordon Dec 11 '10 at 16:18
  • yeah, thanks. I just wanted to be the clearer is possible :o) – Bakaburg Dec 11 '10 at 20:24
  • hwr, if you post your comment as an answer i would mark it as accepted answer. – Bakaburg Dec 12 '10 at 10:14

1 Answers1

22

Many out there, pick one that suits you:

few more can be found in similar question (link thanks to @Gordon) How do you parse and process HTML/XML in PHP?

Community
  • 1
  • 1
dev-null-dweller
  • 29,274
  • 3
  • 65
  • 85
  • 3
    I would also suggest QueryPath http://querypath.org/. it's very similar to phpQuery but the references are a lot better. which one dp you think could be better? – Bakaburg Dec 12 '10 at 10:13
  • Note: QueryPath requires Ctype PHP extension to be available. – Jānis Elmeris Oct 21 '13 at 15:25