I am receiving an xml file and my requirement is to create an edifact file from that xml. But in the dataweaver component of mule, there is not support for edifact file formats. So is there a way I can generate an edifact in mule from dataweaver or any other component.
If you want to generate valid edi documents then you should use edifact-module in mule. It looks complicated but once you start it its really easy. You just need to understand EDI Schema Language (ESL) which is a predefined structure in Mule. You can use DataWeave with output type as application/java. Then pass this output to EDI Connector and it should be able to output EDI document.
I recently used X12 EDI connectors and was able to get it working once I understood ESL. Mule documents https://docs.mulesoft.com/anypoint-b2b/edifact-module should be the good place to start.