I have xml something like this:

<listing>
<val name="One"><![CDATA[value 1]]></val>
<val name="Two"><![CDATA[value 2]]></val>
<val name="Three"><![CDATA[value 3]]></val>
</listing>

So for each listing there are a number of val nodes, each with an attribute
name. Now if wanted to get the xmlText of val with the attribute name of
"Two" how would I go about doing that? Right now I'm doing the following,
which seems bulky.

<cfset temp1 = XMLSearch(xmlRow,"//val[ @name = 'Two' ]")>
<cfset tval = temp1[1].xmlText>

Surely there must be a simpler way to directly call the value?


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:312425
Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5

Reply via email to