Commit 4461eaf6 authored by Lucas Terriel's avatar Lucas Terriel 🐍

add bash script to convert XML to text files

parent 7ea00475
#!/bin/bash
###############################
# SCRIPT TO CONVERT XML TO TEXT
###############################
# Initialize directory
PATH_XML = data/corpus/corpus-long/aida/RawText/*.xml
# Initialize Xpath to cath the content of XML
XPATH_VALUE = "//newsitem//text()"
for file in $PATH_XML;
do xmllint --xpath $XPATH_VALUE "$file" > "${file/%xml/txt}";
done
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment