Jump to content

Recommended Posts

Posted (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 by Champak
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...