See the solution in
Want to show files on web page
You need to do something similiar.
Something like this
Code:
HEADER='<?xml version="1.0"?>
<!DOCTYPE ALR [
<!ENTITY gt "&gt;">
<!ENTITY lt "&lt;">
<!ENTITY quot "&quot;">
]>
<datafile>
<info ID="'
function header {
echo "$HEADER" > output.xml
echo "$1" >> output.xml
echo "\">" >> output.xml
}
Parse the country specific details as
Code:
while read line
do
CONTINENT=$(echo "$line" | awk -F, '{ print $1 }')
COUNTRY=$(echo "$line" | awk -F, '{ print $2 }')
.
.
header $ID
done < input.file
where header is the method given above.