RSS Amplifier

Recent Questions - Software Engineering Stack Exchange · Nov 2, 2011

xpath vs DOM API

0
Sign in to vote or save

This page did not load. You can still read it on the original site — the toolbar below keeps your place in the directory.

I just came up on xpath recently while writing a greasemonkey script and immediately fell in love. I haven't done any benchmarking yet (coming soon), but according to a couple sources that I read, xpath is faster than using the DOM API. After checking out the internals of a couple of libraries (Swizzle and jQuery), I noticed that neither use xpath, but use the DOM API. My question is: Is there…

I just came up on xpath recently while writing a greasemonkey script and immediately fell in love. I haven't done any benchmarking yet (coming soon), but according to a couple sources that I read, xpath is faster than using the DOM API. After checking out the internals of a couple of libraries (Swizzle and jQuery), I noticed that neither use xpath, but use the DOM API.

My question is: Is there something here that I'm not seeing as to why these libraries haven't changed to use xpath (or were first written using xpath rather than the DOM API), or is it just that xpath just hasn't quite caught on yet?

Read on softwareengineering.stackexchange.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.