Looping selected Tag first and then all tags

Friday, May 2, 2014

In VB6 I want to loop through all the html tags in a web browser control. It becomes slow as html contents is large. Below is my requirement.


I want to get a "A" (anchor) tag with a specific name which will be unique in that document.(Example ). After getting that tag i want to loop through all html tags until i get another "A" tag with another specific name. (for ex


So i used



For Each ele In hw2.Document.All
Next


But in my this getting first occurrence of A tag with that name becomes very slow(it takes about 90% of time of whole process) due to large no. of tags like P,br,A,table etc etc


So I am planning to get first "A" tag with specific name(may be just by looping though "A" tag) and then loop though all tags untill i get next "A" tag.


So how it can be done?







http://ift.tt/1iNTTo5