1. Abstract

"Practical XPath" overviews the entire scope of the XML Path Language (XPath) versions 1.0 http://www.w3.org/TR/xpath and 2.0 http://www.w3.org/TR/xpath20 W3C Recommendations, used for writing expressions involving data types, locations in XML documents and simple queries. The objectives of the course are to understand the role and utility of the Recommendations, to overview all the constructs of the Recommendations, to contemplate and write XPath expressions, and to efficiently navigate the available documentation and resources. The relationships of XPath to XSL and to XQuery are explained, though details of XSL and XQuery are not included.

This hands-on course combines the use of lectures and exercises to convey the material. For the practical exercises, attendees are invited to bring a personal computer (with a USB port) and their own XPath environment or they can use public-domain XPath software that will be made available for a Java-based environment.

2. Length

This course runs in a two-day format. Time is allocated on the XPath perspectives of XML syntax and more exercise time or work with the instructor on one's own XML content.

This is an intensive class running 7 hours per day including the exercises, with homework assigned the first night. In markets where English may not be a strong language with students (e.g. China, Japan, etc.) or simultaneous or consecutive translation is needed, please double the number of elapsed days: the syllabus half-day segments will each be taught over a full day at the students' pace. This also leaves extra time for questions of clarification regarding language and the descriptions of the exercise solutions.

3. Expected Audience

This course is aimed at people needing to understand both conceptual and practical aspects of the XPath language and the available tools.

4. Prerequisites - Is this the right class for you?

Attendees must have a working technical knowledge of XML concepts and the syntax of angle brackets, as these are not covered explicitly in the course. Time is allocated to accommodate additional questions from attendees regarding XML syntax, in the perspective of XPath.

To participate in the hands-on exercises, attendees must have either an XPath-equipped or a Java-equipped personal computer. Copies of the exercise materials are available on USB sticks at the course. Complete solutions are provided to research in place of attendees deriving the exercise solutions on their own.

Attendees must have a firm knowledge of the operating system environment as there is no time for coaching from the instructor regarding the command-line environments of today's operating systems.

To get the maximum benefit from this material, please be prepared to work hard. An exercise on the first day is assigned as homework for review on the second day.

If you come to class with problems to solve, you will get more from the material and exercises than trying to learn the concepts in the abstract.

This is an exhaustive (and some students tell us "exhausting") and comprehensive class for both beginners and experts. For a different approach to the same material, you may wish to consider the Mulberry Technology suite of XML classes.

5. Synopsis

For many people, all that is needed to "get over the hump" of understanding the apparently complex concepts of the XML Path Language (XPath) is instruction in the basics upon which these standards are built and exercise of the theory.

"Practical XPath" successfully equips the attendee with an understanding of the major components of these Recommendations, and practice in the skills required to use XPath with publicly available tools. These skills can then be used after the course for self-study of any revisions to this standard and any formatting facets that cannot be covered in such a short course time.

XPath gives us the ability to address our structured information in XML and express the desired queries or addresses to obtain that information for subsequent processing. XPath is an expression language that includes an abstract node-based representation of our structured XML information.

Many people find that the recommendations themselves are difficult to read and understand, while others find the documents outright scary. The curriculum covers the entire suite of functionality in the recommendations in order to understand how to be productive using the technology in a production environment. A number of resources that are publicly available over the Internet are briefly overviewed so that the attendee can determine which materials are important to obtain and use.

The hands-on exercises help cement XPath concepts by leading the attendee to resolve basic, often initially frustrating, obstacles under the supervision of the instructor and collaboration with fellow students. Exercises cover important concepts with simple objectives. Attendees are invited to research completed exercise solutions without needing to derive the solutions on their own.

During the course the exercises are timed to cover breaks so that students can choose to balance work time with break time should extra exercise time be required, thus reducing the chance of delaying the progress of the course material.

6. Hands-on exercises

Sample complete answers to all exercises are available to attendees. All exercises produce HTML for use in a browser to check results, though the principles taught in the course cover all possible result tree syntax serializations.

The following exercises are included in the two-day course:

  • the setup and invocation of XPath processors (using XSLT and XQuery)
  • the XPath data model
  • writing XPath expressions for addressing nodes of a document tree
  • using number functions
  • using string functions
  • using date functions

7. Two-day Delivery Syllabus

7.1. Day 1 of 2

         Course Introduction
         Instructor/Student Expectations
         Module 1: XML and the XML Path Language
         Exercise: Setup
         Module 2: XPath Data Model
         Exercise: XPath Data Model
         Exercise: XPath Expressions
         End of Day

7.2. Day 2 of 2

         Day 1 Questions
         Module 3: XPath Functions
         Exercise: Using number functions
         Exercise: Using string functions
         Exercise: Using date functions
         Annex A: Grammar and Function Quick References
         Question/Answer
         Additional time for exercises and review
         End of Day 

8. Outcomes

At the end of the two-day course, attendees will be able to:

  • understand the role and the scope of XPath in XML document processing
  • write XPath expressions for source tree nodes and other data types
  • navigate the formal Recommendation documents
Crane logo
CRANE
SOFTWRIGHTS
LTD.
 GIT REPOSITORIES 
 RESOURCES RSS XML 

Please consider to


towards our
free resources.

+1 (613) 489-0999 (Voice)

info@CraneSoftwrights.com


Link traversal: This web site relies heavily on client-side redirection. If certain links do not work for you, please ensure you have this behaviour enabled in your browser.

Page navigation:

Site navigation:

Small print: All use of this web site and all business conducted with Crane Softwrights Ltd. is subject to the legal disclaimers detailed at http://www.CraneSoftwrights.com/legal ... please contact us if you have any questions. All trademarks, servicemarks, registered trademarks, and registered servicemarks are the property of their respective owners.

Link legend: links that are marked with this dotted underline will open up a new browser window, otherwise the same browser window is used for the link target. 

Last changed: $Date: 2009/08/14 13:41:34 $(UTC) (Privacy policy)