Say you have a script called foo and a file of configuration options called foo.xml containing this:

10.0.0.101
10.0.1.101
10.0.0.102
10.0.0.103
10.0.1.103