How to parse a list of xml paths in python? -


how parse list of xml paths in python?

for example, have list this:

list=['path1.xml','path2.xml','path3.xml'] 

for single xml can use:

from xml.dom import minidom                                           xmldoc = minidom.parse('path1.xml') 

but how parse each 1 of them?

i use loop:

 xml.dom import minidom  list=['path1.xml','path2.xml']  item in list:      xmldoc = minidom.parse(item) 

this iterate through each item in list , item.

read more here 'iterating loops.'

i recommend using descriptive variable names, kept yours same example illustrative purposes.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -