> It appears you have a cyclic reference in your doc object. > Try adding "doc.unlink()" before you add it to your shelf. That fixed the problem. I did not realize that XML documents could have cyclic references. Thanks for all your help! Orest