With the attachMovie() method you'll need a movieclip in your
library with a linkage identifier (name), so that you can reference
that movieclip in the attachMovie() method call.
It would help if you could post a snippet of the xml as a
point of reference, and perhaps restructure your code so that it is
a bit more manageable.