Click to return to the XML (Extensible Markup Language) home page    
Information Methods     Sample Data     XSL Pattern Syntax    
Web Workshop  |  XML (Extensible Markup Language)

Collection Methods


The XSL Pattern syntax supports collection methods to access the various types of nodes in a document. Any of these collections can be constrained and indexed. The collections return the set of children of the reference node meeting the particular restriction.

Collection Methods

attribute * Returns the collection of all attribute nodes. Synonymous with @*.
cdata * Returns the collection of CDATA nodes.
comment Returns the collection of comment nodes.
element * Returns the collection of all element nodes. Synonymous with *.
node * Returns the collection of all nodes except attributes and the root node of the document. Synonymous with "* | pi() | comment() | text()"
pi Returns the collection of processing instruction nodes.
text Returns the collection of nodes representing text strings. Synonymous with "textnode() | cdata()"
textnode * Returns the collection of text nodes.

* Extended XSL Pattern method described in the XQL Proposal Non-MS link.

Remarks

Note that the XML Document Object Model (DOM) defines a document object that contains comments, processing instructions, and declarations, as well as what is termed the "root element." The XML working drafts use the term "document entity" for the root of the DOM tree—the document object—instead of the "root element." This allows access to nodes at the document entity level, such as comments.



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.