I have an application that kicks around data about an event from function to
function in an XML document. If I have an error I'm trapping with try/catch,
I want to use wddx to serialize the cfcatch struct, parse it to XML, and embed
it in the error element in my event XML.
if I try:
<cfwddx action="cfml2wddx" input="#cfcatch#" output="errorXml" />
<cfscript>
xError = xmlparse(replace(errorXml, 'wddxPacket', 'wddx-packet', 'ALL'));
//Stops CF fromseeing a wddx packet "type"
structInsert(xEvent.event.error, "wddx-packet", xError);
</cfscript>
I get:
The XML node [#document] has type [DOCUMENT] which cannot be added to the
content of an element.
In order to get a node, not a document, if I replace:
structInsert(xEvent.event.error, "wddx-packet", xError);
with:
structInsert(xEvent.event.error, "wddx-packet", x["wddx-packet"]);
I get:
WRONG_DOCUMENT_ERR: A node is used in a different document than the one that
created it.
Anybody have any ideas?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:256432
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4