Top Banner
An introduction to searching in oXygen using XPath James Cummings @jamescummings 14 September 2014 1/47
47

An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

May 24, 2018

Download

Documents

lykhuong
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

An introduction to searching in oXygenusing XPath

James Cummings@jamescummings

14 September 2014

1/47

Page 2: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

XPath

XPath is the basis of most other XML querying andtransformation languages (such as XSLT and XQuery). Itis used in many other contexts (Editors, XML Databases,Content Management Systems, Configuration Files) as away to say what bit(s) of an XML document you are using.

It is just a way of locating nodes in an XML document.

2/47

Page 3: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

What does XPath do?

XPath does nothing! It merely documents a set ofnodes. An XPath processor does something with this.

An XPath expression matches a set of nodes

It encodes an 'address' for the selected nodes, sort oflike a URL does or a file path

This address can be given in a variety of waysincluding absolute or relative methods

3/47

Page 4: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

Example text<body n="anthology"><div type="poem"><head>The SICK ROSE</head><lg type="stanza"><l n="1">O Rose thou art sick.</l><l n="2">The invisible worm,</l><l n="3">That flies in the night </l><l n="4">In the howling storm:</l>

</lg><lg type="stanza"><l n="5">Has found out thy bed </l><l n="6">Of crimson joy:</l><l n="7">And his dark secret love </l><l n="8">Does thy life destroy.</l>

</lg></div><div type="shortpoem"><head>Amorous Rhyme</head><lg type="couplet"><l>What inspired this amorous rhyme?</l><l>Two parts vodka, one part lime</l>

</lg></div>

</body>

4/47

Page 5: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

XML Structure

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

Really attributes (and text) are separate nodes!

5/47

Page 6: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

Basic XPath abbreviated syntax

/ Level selector

// Multi-level selector

../ one level up (relative)

* Wildcard

@ Attribute pre� x

@* Attribute wildcard

[...] Filter / condition

function(item, 'parameter') function with parameters

Every expression 'step' creates a new context, narrowingdown the choice (usually) as you go further down thepath.

6/47

Page 7: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

/body/div/head

body type=“anthology”

div type= “poem”

div type= “shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

XPath locates any matching nodes

7/47

Page 8: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

/body/div/lg ?

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

8/47

Page 9: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

/body/div/lg

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

9/47

Page 10: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

/body/div/@type ?

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

@ = attributes

10/47

Page 11: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

/body/div/@type

body type=“anthology”

div type= “poem”

div

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

type=“poem”

type=“shortpoem”

11/47

Page 12: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

/body/div/lg/l ?

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

12/47

Page 13: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

/body/div/lg/l

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

13/47

Page 14: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

/body/div/lg/l[@n=“2”] ?

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

Square Brackets Filter Selection

14/47

Page 15: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

/body/div/lg/l[@n=“2”]

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

15/47

Page 16: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

/body/div[@type=“poem”]/head ?

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

16/47

Page 17: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

/body/div[@type=“poem”]/head

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

17/47

Page 18: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

//lg[@type=“stanza”] ?

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

// = any descendant

18/47

Page 19: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

//lg[@type=“stanza”]

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

19/47

Page 20: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

//div[@type=“poem”]//l ?

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

20/47

Page 21: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

//div[@type=“poem”]//l

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

21/47

Page 22: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

//lg/../@type ?

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

Paths are relative: .. = parent

22/47

Page 23: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

//lg/../@type

body type=“anthology”

div type= “poem”

div

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

type=“poem”

type=“shortpoem”

23/47

Page 24: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

//l[@n > 5] ?

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

Numerical operations can be useful.

24/47

Page 25: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

//l[@n > 5]

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

25/47

Page 26: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

//div[head]/lg/l[@n=“2”] ?

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

Notice the deleted <head> !

26/47

Page 27: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

//div[head]/lg/l[@n=“2”]

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

27/47

Page 28: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

//l[ancestor::div/@type=“shortpoem”] ?

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

ancestor:: is an unabbreviated axis name

28/47

Page 29: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

//l[ancestor::div/@type=“shortpoem”]

body type=“anthology”

div type=“poem”

div type=“shortpoem”

head

head

lg type=“stanza”

lg type=“couplet”

l n=“4”

l n=“6”

l n=“2”

l n=“3”

l n=“7”

l n=“1”

l n=“8”

l n=“5”

l n=“1”

lg type=“stanza”

l n=“2”l n=“2”

l n=“2”

29/47

Page 30: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

XPath: More About Paths

A location path results in a node-set

Paths can be absolute (/div/lg[1]/l)

Paths can be relative (l/../../head)

Formal Syntax: (axisname::nodetest[predicate])

child::div[contains(lower-case(head), 'ROSE')]

30/47

Page 31: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

XPath: Axes

ancestor:: Contains all ancestors (parent, grandparent,etc.) of the current node

ancestor-or-self:: Contains the current node plus all itsancestors (parent, grandparent, etc.)

attribute:: Contains all attributes of the current node

child:: Contains all children of the current node

descendant:: Contains all descendants (children,grandchildren, etc.) of the current node

descendant-or-self:: Contains the current node plus all itsdescendants (children, grandchildren, etc.)

31/47

Page 32: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

XPath: Axes (2)

following:: Contains everything in the document afterthe closing tag of the current node

following-sibling:: Contains all siblings after the currentnode

parent:: Contains the parent of the current node

preceding:: Contains everything in the document that isbefore the starting tag of the current node

preceding-sibling:: Contains all siblings before thecurrent node

self:: Contains the current node

32/47

Page 33: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

Axis examples

ancestor::lg = all <lg> ancestors

ancestor-or-self::div = all <div> ancestors or current

attribute::n = n attribute of current node

child::l = <l> elements directly under current node

descendant::l = <l> elements anywhere under currentnode

descendant-or-self::div = all <div> children or current

following-sibling::l[1] = next <l> element at thislevel

preceding-sibling::l[1] = previous <l> element at thislevel

self::head = current <head> element

33/47

Page 34: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

XPath: Predicates

child::lg[attribute::type='stanza']

child::l[@n='4']

child::div[position()=3]

child::div[4]

child::l[last()]

child::lg[last()-1]

34/47

Page 35: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

XPath: Abbreviated Syntax

nothing is the same as child::, so lg is short forchild::lg

@ is the same as attribute::, so @type is short forattribute::type

. is the same as self::, so ./head is short forself::node()/child::head

.. is the same as parent::, so ../lg is short forparent::node()/child::lg

// is the same as descendant-or-self::, so div//l isshort forchild::div/descendant-or-self::node()/child::l

35/47

Page 36: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

XPath: FunctionsXPath contains numerous functions: you've seen 'last()'already. There are also many other functions, including:

Conversion: boolean, string, numberContexts: count, deep-equals, last, position

DateTimes: current-dateTime, day-from-dateTime,months-from-duration,timezone-from-dateTime

Math: avg, ceiling, count, floor, max, min, round,sum

Logic: true, false, notNodes: lang, local-name, name, namespace-uri, text

Sequences: distinct-values, empty, index-of, subsequenceStrings: concat, contains, lower-case, matches,

normalize-space, replace, starts-with,string-length, substring, substring-after,substring-before, tokenize, translate,upper-case

and many more!36/47

Page 37: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

37/47

Page 38: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

38/47

Page 39: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

39/47

Page 40: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

40/47

Page 41: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

41/47

Page 42: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

42/47

Page 43: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

43/47

Page 44: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

44/47

Page 45: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

45/47

Page 46: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

46/47

Page 47: An introduction to searching in oXygen using XPathtei.oucs.ox.ac.uk/Talks/2015-02-boras/boras-talk-5-xpath.pdfAn introduction to searching in oXygen using XPath James Cummings @jamescummings

Next!

Next we're going to have a bit of a demo of using XPathfor searching in oXygen and do an exercise.

XPath Tutorial: http://www.w3schools.com/xpath/

XPath Functions:http://www.w3schools.com/xpath/xpath_functions.asp

47/47