Format xml pact input and output