Microsoft HomeproductssearchsupportshopWrite Us   Microsoft Home
Magazine
 |  Community
 |  Workshop
 |  Tools & Samples
 |  Training
 |  Site Info

Workshop  |  XML (Extensible Markup Language)

Collection Methods


The XSL pattern-matching 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

ancestor Finds the nearest ancestor matching the pattern. It returns either a single element result or null.
attribute Returns the collection of all attribute nodes. If the optional text parameter is provided, it returns only attributes matching that particular name.
comment Returns the collection of comment nodes.
element Returns the collection of all element nodes. If the optional text parameter is provided, it returns only element children matching that particular name.
node Returns the collection of all non-attribute nodes.
pi Returns the collection of processor instruction nodes for this document.
textnode Returns the collection of text nodes for this document.

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.


Does this content meet your programming needs? Write us!

Back to topBack to top

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

 

Magazine Home
Ask Jane
DHTML Dude
Extreme XML
For Starters
More or Hess
Servin' It Up
Site Lights
Web Men Talking
Member Community Home
Benefits: Freebies & Discounts
Benefits: Promote Your Site
Benefits: Connect with Your Peers
Benefits at a Glance
Online Special-Interest Groups
Your Membership
SBN Stores
Join Now
Workshop Home
Essentials
Content & Component Delivery
Component Development
Data Access & Databases
Design
DHTML, HTML & CSS
Extensible Markup Language (XML)
Languages & Development Tools
Messaging & Collaboration
Networking, Protocols & Data Formats
Reusing Browser Technology
Security & Cryptography
Server Technologies
Streaming & Interactive Media
Web Content Management
Workshop Index
Tools & Samples Home
Tools
Samples, Headers, Libs
Images
Sounds
Style Sheets
Web Fonts
Training Home
SBN Live Seminars
SBN Live Chats
Courses
Peer Support
CD-ROM Training
Books & Training Kits
Certification
SBN Home
New to SBN?
What's New on SBN
Site Map
Site Search
Glossary
Write Us
About This Site