Warning: fopen(/tmp/SghXTngBZPli-IYt8AB.tmp): failed to open stream: Disk quota exceeded in /home/executea/public_html/blog/wp-admin/includes/class-wp-filesystem-ftpext.php on line 139
Warning: unlink(/tmp/SghXTngBZPli-IYt8AB.tmp): No such file or directory in /home/executea/public_html/blog/wp-admin/includes/class-wp-filesystem-ftpext.php on line 142
Xpath can be formed either by hand coding, if you have good knowledge on the structure of the page or by using tools like Firepath etc
Some common Xpath tidbits
Xpath
Meaning
/
Selects from the root node
//
Selects nodes in the document from the current node that match the selection no matter where they are
//*[@id=’fbt_x_check’]
Selecting with the attribute
//*[@id=’sims_fbt’]/descendant::div
Selecting all descendant divs from current node
//*[@id=’sims_fbt’]/descendant::div[last()]
Selecting the last div from the current node which is descendant (Used Predicate as well !!!)
//*[@id=’fbt_x_check’]/following-sibling::div
Selecting next sibling from current node
Here is the complete video of the above discussion
Thanks for watching the video !!!
Please let me know if you have any questions from the above video.
Thanks,
Karthik KK
Post Author:
Karthik kk
One Reply to “Understanding and working with Xpath”
Hi Karthik,
How can i get xpath in IE browser.