warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in C:\inetpub\Websites\DevGuru\www\includes\common.inc(1762) : eval()'d code on line 1.

XML DOM » Node » selectNodes

Compability: Internet Explorer

Syntax:
node.selectNodes(patternString)

This method creates a NodeList of all matching descendant nodes returned by the specified pattern-matching operation.

If no match is made, an empty node list is returned. This method is similar to the selectSingleNode method, but returns all nodes that match the pattern rather than just the first encountered.

Examples

Code:
XML:

<Vocabulary>
   <Word type="noun" level="1">
      <English>cat</English>
      <Spanish>gato</Spanish>
   </Word>
   <Word type="verb" level="1">
      <English>speak</English>
      <Spanish>hablar</Spanish>
   </Word>
   <Word type="adj" level="1">
      <English>big</English>
      <Spanish>grande</Spanish>
   </Word>
</Vocabulary>

VBScript:

Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = False
objXMLDoc.load("vocabulary.xml")
Set NodeList = objXMLDoc.documentElement.selectNodes("Word/English")
For Each Node In NodeList
   document.write(Node.text & "<br>")
Next
Output:
cat
speak
big
Explanation:

This example loads the 'vocabulary.xml' file and uses the selectNodes method to create a collection of all 'English' element nodes. The code then iterates through the collection displaying the text of each.

Language(s): VBScript XML