Anyhow, the only ones I could find were in JavaScript, so I had to translate from JS to PHP... which was fun.. well less boring and certainly less painful than you might tihnk.
Anyway, I based it on Joe Hewitt (of firebug)'s code and once I had ironed out the kinks, it worked brilliantly!!
Here is my code (nice and long, so it is attached) for creating an XPATH query from a CSS selector.
I've tested it out on "div.bold.italic#content" and it works great, as does with direct- and any-child selectors, as well as multiple selections at once.
Any comments? Surprised at how close the code is between JS and PHP?
Attached File(s)
-
csstoxpath.php (2.49K)
Number of downloads: 10
Help


















