function to format xml namespace mapping as arrays for postgresql