write_xml_to_df_to_csv

Converts an XML file to CSV, using the first element in the root as a list of elements.

Example command line:
python write_xml_to_df_to_csv.py Aanbestedingen_2017-01-01_tot_2018-05-02.xml data

usage: write_xml_to_df_to_csv [-h] full_path output_folder

Positional Arguments

full_path Add full filename and path to XML, for example data/myXML.xml
output_folder Specify the desired output folder path, for example: app/data

functions

class datapunt_processing.extract.write_xml_to_df_to_csv.XML2DataFrame(xml_data)

Class for parsing and XML to a Dataframe

normalize(name)

Remove the schemaname from keys/values. input:

returns:
percelen
datapunt_processing.extract.write_xml_to_df_to_csv.parser()

Parser function to run arguments from commandline and to add description to sphinx docs. To see possible styling options: https://pythonhosted.org/an_example_pypi_project/sphinx.html

datapunt_processing.extract.write_xml_to_df_to_csv.xml_to_df(file)

Function to parse an XML file to a Pandas dataframe. Args:

file = filename of the XML
Result:
df of the xml