<commit_before># xmlutils.py
A set of Python scripts for processing xml files serially, 
namely converting them to other formats (SQL, CSV). The scripts use ElementTree.iterparse() 
to iterate through nodes in an XML file, thus not needing to load the whole DOM into memory. 
The scripts can be used to churn through large XML files (albeit taking long :P) without 
memory hiccups. (Note: The XML files are NOT validated by the scripts.)

<NAME>, October 2011

License:	MIT License

Documentation: http://kailashnadh.name/code/xmlutils.py

## xml2csv.py
Convert an XML document to a CSV file.

<pre>
python xml2csv.py --input "samples/fruits.xml" --output "samples/fruits.csv" --tag "item"
</pre>

### options
<table>
	<tbody>
		<tr>
			<td>--input</td>
			<td>
				Input XML document's filename*
			</td>
		</tr>
		<tr>
			<td>--output</td>
			<td>
				Output CSV file's filename*<commit_msg>Added xml2json.py, a library for converting XML to JSON<commit_after># xmlutils.py
A set of Python scripts for processing xml files serially, 
namely converting them to other formats (SQL, CSV, JSON). The scripts use ElementTree.iterparse() 
to iterate through nodes in an XML file, thus not needing to load the whole DOM into memory. 
The scripts can be used to churn through large XML files (albeit taking long :P) without 
memory hiccups. (Note: The XML files are NOT validated by the scripts.)

<NAME>, October 2011

License:	MIT License

Documentation: http://kailashnadh.name/code/xmlutils.py

## xml2csv.py
Convert an XML document to a CSV file.

<pre>
python xml2csv.py --input "samples/fruits.xml" --output "samples/fruits.csv" --tag "item"
</pre>

### options
<table>
	<tbody>
		<tr>
			<td>--input</td>
			<td>
				Input XML document's filename*
			</td>
		</tr>
		<tr>
			<td>--output</td>
			<td>
				Output CSV file's filename*
{'fraction_non_alphanumeric': 0.11068702290076336, 'fraction_numerical': 0.007088331515812432, 'mean_word_length': 3.669211195928753, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 13}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3326157', 'n_tokens_mistral': 661, 'n_tokens_neox': 591, 'n_words': 240}