> Now I'm having a strange problem: I can only add one element to a > document (using appendChild). For any further calls, I get an exception > about an invalid parent/child relationship!? Indeed. In XML, a document contains only a single element; it is an error if a document has two or more elements. Regards, Martin