<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=Xpath_Selectors</id>
	<title>Xpath Selectors - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=Xpath_Selectors"/>
	<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Xpath_Selectors&amp;action=history"/>
	<updated>2026-04-22T22:22:30Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://training-course-material.com/index.php?title=Xpath_Selectors&amp;diff=61544&amp;oldid=prev</id>
		<title>Ksolis at 02:32, 4 October 2017</title>
		<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Xpath_Selectors&amp;diff=61544&amp;oldid=prev"/>
		<updated>2017-10-04T02:32:29Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:course_code_xmlfund]]&lt;br /&gt;
[[Category:XML]]&lt;br /&gt;
[[Category:XPath]]&lt;br /&gt;
parent, children&lt;br /&gt;
siblings&lt;br /&gt;
ancestors, descendents&lt;br /&gt;
&lt;br /&gt;
  / &amp;lt;- root of the page&lt;br /&gt;
&lt;br /&gt;
  /html/body &amp;lt;- root of the page to the html tag to the body tag&lt;br /&gt;
&lt;br /&gt;
walking, &amp;#039;traversing&amp;#039; a path&lt;br /&gt;
&lt;br /&gt;
  /html/body/div&lt;br /&gt;
entering the root of the page, walking into the html tag, down into body, into the first div we encounter&lt;br /&gt;
&lt;br /&gt;
What about the second div?&lt;br /&gt;
  /html/body/div[2]&lt;br /&gt;
&lt;br /&gt;
What about grabbing any div we find?&lt;br /&gt;
  //div&lt;br /&gt;
&lt;br /&gt;
What about any div, with the id of first_section?&lt;br /&gt;
  //div[@id=&amp;#039;first_section&amp;#039;]&lt;br /&gt;
&lt;br /&gt;
What about the second list item, beneath the div with the id, first_section?&lt;br /&gt;
  //div[@id=&amp;#039;first_section&amp;#039;]//li[2]&lt;br /&gt;
&lt;br /&gt;
What if we do not know what the tag is, but know we want the id of &amp;#039;second_section&amp;#039;?&lt;br /&gt;
  //*[@id=&amp;#039;second_section&amp;#039;]&lt;br /&gt;
&lt;br /&gt;
What about grabbing the element with the id of &amp;#039;first_item&amp;#039;?&lt;br /&gt;
  //*[@id=&amp;#039;first_item&amp;#039;]&lt;br /&gt;
&lt;br /&gt;
What about grabbing the element above that? -- what does it grab?&lt;br /&gt;
  //*[@id=&amp;#039;first_item&amp;#039;]/../&lt;br /&gt;
&lt;br /&gt;
And the one above that? -- what does it grab?&lt;br /&gt;
  //*[@id=&amp;#039;first_item&amp;#039;]/../../&lt;br /&gt;
&lt;br /&gt;
And the one above that?&lt;br /&gt;
&lt;br /&gt;
How about grabbing any option item under a select tag?&lt;br /&gt;
  //select//option&lt;br /&gt;
&lt;br /&gt;
And the entire document?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Exercises===&lt;br /&gt;
&lt;br /&gt;
# Grab the input element with the name of &amp;#039;email&amp;#039;&lt;br /&gt;
# Grab the element with the value of &amp;#039;promote&amp;#039;&lt;br /&gt;
# Do it in a more specific fashion&lt;br /&gt;
# Grab the element above that&lt;br /&gt;
# Select all the input elements within that element&lt;br /&gt;
# Grab just the second input element&lt;/div&gt;</summary>
		<author><name>Ksolis</name></author>
	</entry>
</feed>