#        print "+++ Person ID: " + Person_ID urllib.parse import urlparse parsed.path.split('/')[2]
#        print "+++ Solicitor ID: " + Solicitor_ID taken from the calling office loop 
#        print "+++ DX Address: " + DX_Address string(.//*[@id='main-details-accordion']/div[1]/dl[1]/dd[2])

Many need spliting of multiple lines
#        print "+++ Accreditations: " + Accreditations string(.//*[@class='accreditation']/@alt)
#        print "+++ Areas of Practice: " + Areas_of_Practice string(.//*[@id='areas-of-practice-accordion']/ul) 
#        print "+++ Languages: " + Languages string(.//*[@id='languages-spoken-accordion']/ul) 


#        print "-- Solicitor ID: " + Solicitor_ID urllib.parse import urlparse parsed.path.split('/')[2]
 
#        print "-- Solicitor Type: " + Solicitor_type string(.//*[@id='main-details-accordion']/dl[1]/dd[4])
#        print "-- DX Address: " + DX_Address string(.//*[@id='main-details-accordion']/dl[2]/dd[2])
#        print "-- Facilities: " + Facilities string(.//*[@id='main-details-accordion']/div/p/img/@data-original-title)

Need to hold the dictionary outside the main loops so that the values can be updated by both.
