> I'm using XmlSearch() to query an XML document in CFMX 6.1.��I want to
> store the resulting data in a another variable that is an XML
> object.��I'm having some difficulty because the XmlSearch() function
> returns an array of the XML nodes that match the XPath search
> criteria.��I tried using <cfxml> to create a new XML object from the
> array returned, but with no success.��My last resort is to loop
> through the array returned and re-create a new XML object but I think
> there has to be an easier way.
>
> Can anyone provide some guidance or a solution to getting the
> XmlSearch returned data back into an actual XML object?
>
I believe the way to do it is something like the following untested
code.

<cfscript>
result = XmlSearch();
doc = XmlNew();
for(itr = 1; itr lte ArrayLen(result); itr = itr + 1)
doc.appendChild(result[itr]);
</cfscript>

Matt Liotta
President & CEO
Montara Software, Inc.
http://www.MontaraSoftware.com
(888) 408-0900 x901

[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to