Multiple choice technology testing

What is the indexed property used to retrieve child nodes from a collection?

  1. collection_obj.element(0)

  2. collection_obj.Item(0)

  3. collection_obj.node(0)

  4. No such property

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In VBScript with XML DOM, the Item property (not element or node) is the indexed property used to retrieve child nodes from a collection. The syntax collection_obj.Item(0) retrieves the first item from the collection (note that in some contexts this may be 0-indexed or 1-indexed depending on the specific collection type). Options A and C use incorrect property names that are not valid DOM collection methods.