<div type="dedicatoryEpistle">
<p> Hi </p>
</div>
|
<root>
<div type="dedicatoryEpistle">
<salute> Hi </salute>
<p> Hi </p>
</div>
<p> Hello </p>
</root> |
Parent:
<root>
<div type="dedicatoryEpistle">
<salute> Hi </salute>
<p> Hi </p>
</div>
<p> Hello </p>
</root> |
Ancestor:
<root>
<div type="dedicatoryEpistle">
<salute> Hi </salute>
<p> Hi </p>
</div>
<p> Hello </p>
</root> |
Child:
<root>
<div type="dedicatoryEpistle">
<salute> Hi </salute>
<p> Hi </p>
</div>
<p> Hello </p>
</root> |
Sibling:
<root>
<div type="dedicatoryEpistle">
<salute> Hi </salute>
<p> Hi </p>
</div>
<p> Hello </p>
</root> |
Descendant:
<root>
<div type="dedicatoryEpistle">
<salute> Hi </salute>
<p> Hi </p>
</div>
<p> Hello </p>
</root> |
We can also specify further which elements we want by picking certain attribute values if we don't know the exact numbers
We specify that we are talking about an attribute in the square brackets [ ] by using the @ symbol
The square brackets can be chained to further refine the result
You can do this with any attribute and value
CitizenK, Cuimingda, Dria, ExE-Boss, Fredchat, Jonnyq, mete0r, Mgjbot, Nickolay, Ptak82, Sheppy, & SphinxKnight. (n.d.). Axes. Axes - XPath | MDN. Retrieved December 13, 2021, from https://developer.mozilla.org/en-US/docs/Web/XPath/Axes.
CitizenK, Cuimingda, Dria, ExE-Boss, Fredchat, Jonnyq, mete0r, Mgjbot, Nickolay, Ptak82, Sheppy, & SphinxKnight. (n.d.). Functions. Functions - XPath | MDN. Retrieved December 13, 2021, from https://developer.mozilla.org/en-US/docs/Web/XPath/Functions.
W3Schools. (n.d.). XPath Tutorial. Retrieved December 13, 2021, from https://www.w3schools.com/xml/xpath_intro.asp.
"XPath Axes - ancestor, parent, following-sibling, preceding-sibling, child, descendant." YouTube, uploaded by H Y R Tutorials, December 13, 2021, https://youtu.be/aAWvwGFkySI
Fall 2021 Honors Digital Humanities Class: Nick Ribeiro and Ellie Lynch
Spring 2022 Library Digital Humanities Intern: Meeghan Bresnahan