Written for the working developer. Detailed explanations for every function and operator, accompanied by examples.
Each chapter includes a table of quick reference. The final chapter walks you through 18 common problems and shows you how to solve them.
Disecting the components of a XPath expression. Showing you how to write expressions that are easy to maintain.
Making use of Node Tests as a filter to select the nodes we want.
Operators are characters that have special meaning. What effect do they have on the expression?
Filter operators are useful for selecting nodes from a collection. We show you how combining them helps you select the nodes you want.
Axes is another form of filter, one that relies on the relationship of the nodes. It is perfect when you need to select parent, children or siblings.
XPath has many useful in-built functions. We visit each of them to see them in action.
The final chapter makes use of all the tools we learnt and apply them in 18 common real world scenarios. It may be just the same problem you have.
Buy now at $12.- DRM free. Available in PDF, MOBI and EPUB. Includes an A3 cheat sheet. -
Zan is currently the CTO at Courex.
He has been working in the technology industry for more than 10 years. Having worked with web startups for a number of years means he'd touched the entire web stack. As you can see, he does not have a lot of hair. If you are losing hair(like him), shave it. Life is too short to be spent fretting over hair.
XPath is a query language for selecting nodes from XML and HTML documents. It also allows you to extract values from the nodes. You can count the number of nodes satisfying a particluar characteristic, or you can extract the text. It is especially useful when doing testing or web scraping.
In your day to day work, invariably you would come across situations where you need to extract information or manipluate a HTML/XML document. XPath shines for such situations, making you more productive.
In many libraries, you are offered two ways of selecting nodes: CSS or XPath. My advice is learn both. Some situations calls for CSS and some XPath. You'd like to have the advantage of being able to use the right one at the right time.
This book covers version 1. This version is the most widely implemented out in the wild.
Yes, you would receive lifetime updates for this edition.
My email is firstname.lastname@example.org. Feel free to reach me if you have any questions.