| node() | any node of any type |
| / | root |
| * | any element node |
| @* | any attribute node |
| text() | any text node |
| comment() |
|
| processing-instruction() |
|
| processing-instruction(’target’) |
|
|
|
The test program can be employed for the above examples (it requires java 5.0)