If I'm not wrong XML type extended from String type, so you can try to use List of String for your purpose.
At least in Workbench if you create varible type string you can easy store there xml, and get it back.
The problem is that the XML type seems to keep the brackets and the XML structure in general where as the String type seems to throw it away. Either way though I cannot actually test that with a list of strings because for some silly reason i can't seem to simply assign the list the root node and have it do its thing.
The XML object is a representation of the org.w3c.dom.Document object. Although LC can convert this to an string or a com.adobe.idp.Document object fairly easily, its still a w3c document under the covers.
So the only question that is left is how I can have a dynamic list of these guys?
List<Document> list =
Hope this helps.
Thanks. I will give this a shot. I almost had things working with a map. But the problem was that the "Using XPath expressions as list indexes and map keys" help page is misleading because the funtion doesn't actually work. It will just return a null. When you put something into a string you must ommit the single quotations.