append_xml function

internal function to append rows to the output xml file