comment()

The comment() node test specifically refers to comments. For example, this XPointer points to the third comment in the document:

/descendant::comment()[position()=3]

Because comments do not contain attributes or elements, you cannot add an additional child, descendant, or attribute relative location step after the first term that selects a comment.You can use a string relative location axis to select part of the text of the comment, though.


Previous | Next | Top | Cafe con Leche

Copyright 1999 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified August 20, 1999