add xml output option

now accepts -x specifying xml output
comments
fixed formatting to include <function> element

fixed xml output to make <output> and <derivative> correctly
subelements of <function>
Merge pull request #24 from stepthom/Create-xml-output

Create xml output