Is there any way to insert one xml object as a child node in another xml object?

Right now I'm doing an xml search, which returns an array with xml
objects. I want to loop through the array, process each xml object
individually. (during which I add nodes to each object) Then I want to
combine all the objects in the array as children of another xml
object.
So far I have only been able to combine these by converting each array
element to it's xml string, replace the xml definition and insert the
xml string into the destination xml string. Then finally parse the
destination xml string. Why can't I get this to work without strings
or a recursive UDF? I tried:
ArrayAppend(destXML.DispenseFile.XmlChildren,
XmlElemNew(destXML,XML_SearchResultsArray[1].xmlName));
destXML.DispenseFile.XmlChildren[arraylen(destXML.DispenseFile.XmlChildren)]
= XML_SearchResultsArray[1];
but I get the error:
WRONG_DOCUMENT_ERR: A node is used in a different document than the
one that created it.
Only thing I can find with google is that the DOM1 doesn't support
this so am I correct in assuming this has to do with the underling
java?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211361
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to