Lab 3: Getting Practice using XPath Functions

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. How many Title elements are in this document? (Create an XPath expression
   that answers this question)


2. Book has an id attribute. What is the length of the value of id?  (Create an XPath expression
   that answers this question)


3. Select all the Titles that do not contain the # symbol.


4. Fetch the ISBN value of the Book. I only want the actual
   ISBN, not 'isbn-', i.e., you need to strip off the 'isbn-' prefix.


5. What's the name of the first child element of the Chapter element with id="test"? (Create an XPath expression
   that answers this question)


6. Encode this string: 'Attack the Enemy'. Use whatever encoding scheme you want.


7. Write an XPath expression that divides 22 by 7.


8. Select every other Title. Hint: there is an XPath function called position() that
   returns an integer. That integer represents the position of the element within
   the sequence of elements that were selected.


9. Write an XPath expression that substracts 2 from 4.


10. Write an XPath expression that adds 60 to Date.
