Is there a way to get a single, modified XML document/structure?

--------------
Ian Skinner
Web Programmer
BloodSource
Sacramento, CA


-----Original Message-----
From: Massimo Foti [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 8:48 AM
To: CF-Talk
Subject: Re: XML/XPATH


> The closet I've gotten is this.  <cfset newXML =
> XmlSearch(masterXML,"/root/article[type = 'Event']")>.  But, this returns
> an Array of XML structures, when what I really want is a single XML
> structure.
>
> newXML[1]=
> <article>
>    <type>Event</type>
> </article>
> newXML[2]=
> <article>
>    <type>Event</type>
> </article>
>
> What relatively basic concept am I not getting here?

Executing an XPath expression on a XML structure with XmlSearch always
return the CFML equivalent of a DOM "NodeList". The NodeList may be empty or
contain only one node but it's still a NodeList, so in CFML you get an array
of XML elements.

----------------------------
Massimo Foti
Certified Dreamweaver MX Developer
Certified Advanced ColdFusion MX Developer
http://www.massimocorner.com/
----------------------------





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Reply via email to