One of the XML invoice formats is the german ZUGFeRD specification. This requires a valid XML file, that must be embedded in a PDF/A-3 file. So you need to build up a PDF/A-3b invoice file and combine it with an XML file created with the InterXML module. Details is covered in the descriptions of the InterXML module.