As long as you don't use the same variable "xml" for all of your
function results, you won't have to re-parse the xml.  Regardless, of
the size of the xml source, it would be a waste of processing to parse
it twice in the same request.

cfset xmlObj = xmlParse(xmlSource)
cfset xmlResult = xmlSearch(xmlObj, "//root/")
cfset xmlString = xmlResult[1].toString()

M!ke

-----Original Message-----
From: Ian Sheridan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 13, 2006 10:24 AM
To: CF-Talk
Subject: Re: XML - looking to return an XML object original parced
format

Well this is about returning the data structure to a state that it was
in when you first parsed the xml. Which I have figured out how to do.
Here it is:

<cfset xml = xmlparse(xml) >
<cfset xml = xmlsearch(xml,"//root/") >
<cfset xml = xml[1].tostring() >
<cfset xml = xmlparse(xml) >

done... :)

- Ian

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243350
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