Search method will return new collection of entities
that match your search. Using this method, you can get only
entities you're interested in, such as pictures,
tables, frames etc.
Using SearchTypes
constants, you will define the type of search - attributes,
size, position in document etc.
For example, to get only entities that have attribute
SRC you could use this code:
Dim ImageParts As wodHtmlEntities
Set ImageParts =
tempCollection.Search(ByAttributeName, "SRC", False)
( <IMG
SRC="image.jpg"> would be one such
entity).
You can combine more than one search method in a row to
get more specific search. For example, to get only JPG
images you can do this:
Set ImageParts =
tempCollection.Search(ByAttributeName, "SRC", False).Search(ByAttributeValue, "*.jpg", False)
or even more accurate search
Set ImageParts =
tempCollection.Filter("IMG").Search(ByAttributeName,
"SRC", False).Search(ByAttributeValue, "*.jpg", False)
which will first filter all entities for <IMG...>
tags only, then search ones that have "SRC=..."
attribute, and then only return ones that have
"*.jpg".
Each Search method will return new IwodHtmlEntities
object - collection that contains subset of parent
collection.