Use XPath to express the following queries to the document in Figure 15.19:

a. Find all Student elements whose Ids end with 987 and who took MAT123.
b. Find all Student elements whose ?rst names are Joe and who took fewer than three courses.
b. Find all Student elements whose ?rst names are Joe and who took fewer than three courses.


a.


//Student[../CrsTaken/@CrsCode="MAT123"
and ends-with(@StudId,"987")]


b.

//Student[starts-with(@Name,"Joe") and count(../CrsTaken) < 3]


c.

//CrsTaken[@Semester="S1996" and starts-with(../Student/@Name,"P")]

Computer Science & Information Technology

You might also like to view...

The technique of immediate data validation and reporting of errors is known as _________.

A. online validation B. regular expression C. inline validation D. immediate validation

Computer Science & Information Technology

List some attributes and operations that might be defined for a class called Course that represents a college course (not a particular offering of a course, just the course in general).

What will be an ideal response?What will be an ideal response?What will be an ideal response?

Computer Science & Information Technology

Testing should generate error-free software.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Chrome OS is the first ____.

A. cloud operating system B. high-performance operating system C. virtual operating system D. storage operating system

Computer Science & Information Technology