Do you mean you have an XML file stored in a FileDocument, and you want to return the contents of this file as a String so you can use it in your microflow?
If you do, have a look at the Community Commons module in the Marketplace. It has an action called StringFromFile that can do this for you.
Hope this helps.
Can you give some more details what you mean exactly with “the xml file”? What do you need to do with it in Mendix?
Often the best approach when you process an external file in Java is to return the serialized XML as a String from the Java action. In Mendix you can deserialize it with an import mapping to objects after which you can use the objects in microflows.
Storing the XML file in an object inherited from FileDocument in Java is more difficult and requires some more knowledge of Java.