Lab 1: Getting Practice with Writing XPath Expressions

In this folder you will find:

   - Book.xml

Open Book.xml and see how this XML document is organized.

Drag and drop Book.xml into Oxygen XML.

In Oxygen, create the XPath expressions to:

1. Select the title of the book (use an absolute XPath expression)


2. Establish Book as the context node. Repeat (1) but this time
   use a relative XPath expression.


3. Select the Chapter titles (use an absolute XPath expression)


4. Select all the title elements in the entire XML document


5. What do you expect this XPath expression to do: //Title[1]
   Go ahead and execute it. Can you explain the result?


6. Select the Section within the Chapter with the id value "test."


7. Select all the Section elements that have a Subsection.


8. Select all the Section elements that do NOT have a Subsection.


9. Is the value of the id attribute for Chapter 2 equal to 'test'? (Write an XPath expression
   that answers this question.)


10. What is the value of the id attribute for Chapter 2? (Write an XPath expression
   that answers this question.)
