Skip to content

Tag: beautifulsoup

Can’t write in csv file

When I try to write the information in the csv file, error is thrown: How to keep the file open through the whole script execution ? Or I have to open it every time I am adding content ? EDIT In fact, the file is not even created. Answer The file closes at the end of the with block –

Multiple xml files to csv using python

I am trying to extract specific tags from XML and converting to CSV file. i was able to this for single XML file which is extracting all the identifier tag in the file. Here my question is 1) how to extract from multiple XML files to single CSV file and 2) in the given XML file the required tag is