more sql stuff, should have been in last commit

also a tiny mod to parser.js noting that xml isn't xml, rather it is a
perl hash