I am using Castor XMLDiff to find the difference between 2 XML files. It compares two XML documents located at the given URL locations. Both my XML files are being generated at runtime and they are in the form of String. My question is how can I convert a String into an XML file, so that I can pass the file location as an argument. 

I have a String in the following form:

```xml
<Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Header><MessageID>7dc1a6b9-5e84-4ee8-b801-816f4eccbe26</MessageID><MessageDate>.....

```

The method public XMLDiff(final String file1, final String file2) requires 2 file locations. Instead of a file location, I have the above stated string. What is the best way to persist this string in the form of an XML document, so that I can get its location and pass it to XMLDiff?