Does anyone know a library that allows DOM traversing in strings using a jquery like selector engine?
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?