LocalConnection, XML, and Flash 8

I’m using a LocalConnection to pass XML to a function in a Flash 8 swf file. When the XML reaches the function it is either an empty object (I think it’s empty) or undefined.

I’ve tried passing the XML using toString() and toXMLString() but nothing is working. Other functions accepting string and number parameters work fine, but not the XML.

The XML is in an external file which is being loaded using AS3 and is need by both Flex and the swf. So is there any way to load it once and make it available to both, or is it just easier to load it into both?

The data needed by Flex is only a small part of the XML file, but the swf needs the whole thing.

Thanks,
Brendan.