Personally I do this with XSLT.
<cfxml variable="doc1">
<root>
<member id="10">
<name>Ian</name>
<sex>male</sex>
</member>
</root>
</cfxml>
<cfxml variable="doc2">
<root>
<member id="1">
<name>Joe</name>
<sex>male</sex>
</member>
<member id="2">
<name>John</name>
<sex>male</sex>
</member>
<member id="3">
<name>Sue</name>
<sex>female</sex>
</member>
</root>
</cfxml>
<cffile action="write" file="#expandPath("/")#\doc2.xml"
output="#ToString(doc2)#" nameconflict="overwrite">
<!--- METHOD ONE using a depreciated and undocumented
method --->
<cfset newNode = doc1.root.member.cloneNode(true)>
<cfset doc2.changeNodeOwner(newNode)>
<cfset doc2.root.appendChild(newNode)>
<cfdump var="#doc2#" label="Merged by hidden functions"
expand="no">
<!--- METHOD TWO using XSLT --->
<!--- create an xsl docutment--->
<cfoutput>
<cfsavecontent variable="transformer">
<xsl:stylesheet xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml"/>
<!--load the merge file -->
<xsl:variable name="emps"
select="document('#expandPath("/")#\doc2.xml')"/>
<!--- this line references and XML file to be combined
with the main file,
I wonder if there is a way to use an XML document in memory
here? --->
<!-- combine the files -->
<xsl:template match="/">
<root>
<!-- select all the child nodes of the root tag in the
main file -->
<xsl:for-each select="root/child::*">
<!-- copy the member tag -->
<xsl:copy-of select="."/>
</xsl:for-each>
<!-- and all the child nodes of the root tag in the merge
file -->
<xsl:for-each select="$emps/root/child::*">
<!-- copy the member tag -->
<xsl:copy-of select="."/>
</xsl:for-each>
</root>
</xsl:template>
</xsl:stylesheet>
</cfsavecontent>
</cfoutput>
<!--- create a combined xml document --->
<cfset doc2 = XMLparse(XMLtransform(doc1,transformer))>
<cfdump var="#doc2#" label="Merged by XSLT"
expand="no">