Retrieves an interface pointer to a zero-based collection of all the elements in an HTML document.
Syntax
HRESULT get_all( IHTMLElementCollection **p );
Parameters
- p
- Address of a pointer to the IHTMLElementCollection interface of the collection of elements.
Return Value
Returns S_OK if successful, or an error code otherwise.
Remarks
The collection includes one element object for each valid HTML tag. If a valid tag has a matching end tag, both tags are represented by the same element object. The collection always includes one element object for each of the HTML, HEAD, and BODY tags regardless of whether the tags are present in the document. If the document contains invalid or unknown tags, the collection includes one element object for each. Unlike valid end tags, unknown end tags are represented by their own element objects. The order of the element objects in the collection is the same as the order of corresponding tags in the document. Although the collection indicates the order of tags, it does not indicate which tags contain others.
You can use the length property to determine the number of element objects in the collection, and the item or tags function to retrieve individual objects or collections of objects from the collection. You can retrieve individual objects by specifying the object's index or by using its name property. Index values can be either numbers or names. Number values are zero-based, that is, 0 for the first element object, 1 for the next, and so on. A name is valid only if it is defined by a name or ID property for at least one of the elements in the collection. If the name is defined by more than one element, you can use it to retrieve a collection of all element objects that define that name.
Windows CE
Windows CE Use version 2.12 and later Minimum availability Internet Explorer 4.0
See Also
get_body