summaryrefslogtreecommitdiff
path: root/oracle-conversion/fixml.sh
blob: 75bbcf8eef1fd64a4e0e36c8f79207bafd6515bd (plain)
1
2
3
4
5
6
7
sed  -e "s/ *$//" -e "s/^ *//" -e "/^$/d" $1 | \
	sed 's/^SQL.*from \([^ ]*\)'"'"'.*/<ROWSET NAME="\1">/' | \
	sed -e "/<ROWSET>/d" -e "/^SQL/d" -e '/^<?xml/d' | \
	sed -e '1i <DATABASE>' -e '$a </DATABASE>' | \
	sed  -e :a -e 'N;s/\n//g' -e ba | \
	sed 's: *</:</:g' | \
	xmllint --format -