XPath guides

This page lists guides for XPath. They're intended to help you understand what kinds of things are possible using XPath in JavaScript, and highlight the similarities with CSS selectors.

Comparison of CSS Selectors and XPath

This article seeks to document the difference between CSS Selectors and XPath for web developers to be able to better choose the right tool for the right job.

Introduction to using XPath in JavaScript

This document describes the interface for using XPath in JavaScript. The main interface to using XPath is the evaluate function of the document object.

XPath snippets

This article provides some XPath code snippets — simple examples of how to a few simple utility functions based on standard interfaces from the DOM Level 3 XPath specification that expose XPath functionality to JavaScript code. The snippets are functions you can use in the real world in your own code.

See also