Formulate the following XPath queries for the document in Figure 15.21:
a. Find the names of all courses taught by Mary Doe in fall 1995.
b. Find the set of all document nodes that correspond to the course names taught in fall 1996 or all instructors who taught MAT123.
c. Find the set of all course codes taught by John Smyth in spring 1997.
a.
//CrsName[../Instructor="Mary Doe"
and ../@Semester="F1995"]/text()
Note that we use text() at the end to get the text (course names themselves) as opposed to CrsCode element nodes.
b.
//CrsName[../@Semester="F1996"]
| //Instructor[../@CrsCode="MAT123"]
c.
//Class[Instructor="John Smyth" and @Semester="S1997"]/@CrsCode
You might also like to view...
Answer the following statements true (T) or false (F)
1) If a class leaves one method in an interface undeclared, the class is implicitly declared by C# as an abstract class. 2) An interface is typically used in place of an abstract class when there is no default implementation to inherit. 3) Abstract classes can provide data and services for objects. 4) Declaring an interface protected allows for extra security precautions.
In a database, a ________ displays summarized information and is best structured for printing
A) form B) report C) field D) query
Goal Seek differs from one and two-variable data table analysis by ________
A) providing a row of possibilities B) providing a single best answer rather than a table of possible answers C) building a data table automatically D) providing an average of the possibilities
Briefly describe the Microsoft Hyper-V hypervisor.
What will be an ideal response?