Champak Posted August 29, 2008 Share Posted August 29, 2008 (edited) Two question on getting information from a website. 1/ Is it faster to go straight for an index number when of getting tags/tables/collections than doing a loop style like: For $oElement In $oElements If something = something Then do something EndIf Next 2/ Is it smarter to do the loop style because the website my change up the layout? Thanks Edited August 29, 2008 by Champak Link to comment Share on other sites More sharing options...
Richard Robertson Posted August 29, 2008 Share Posted August 29, 2008 1. Indexing is faster if you know in advance what indexes you need to visit, so you don't have to waste time enumerating values that you do nothing with. 2. If the site changes, you may have to stick with the loop. XPath would be more convenient than enumeration, but I don't think IE supports XPath natively. Link to comment Share on other sites More sharing options...
Champak Posted August 30, 2008 Author Share Posted August 30, 2008 Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now