Microsoft SDK for Java

ElementCollection Class Constructors

The ElementCollection class contains the following constructors:

ElementCollection(Element root)
ElementCollection(Element root, Name tag, int type)

ElementCollection(Element root)

Creates new collection object for given element.

Syntax

public ElementCollection(Element root);

ElementCollection(Element root, Name tag, int type)

Creates a new collection for iterating over the immediate children of the given root node that have matching tag names, element types, or both.

Syntax

public ElementCollection(Element root, Name tag, int type);

Parameters

root The root to form the collection around.
tag The name of the tag; this parameter can be null if the name is not important.
type The element type. Element.ELEMENT is the most common. If the element type is not important, pass -1.

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