I am using ColdFusion 7 and am new at parsing XML.
I am trying to get at the ID property and extract its value.
<cfset newRate = StructNew()>
<cfset newRate.Carrier = "USPS">
<cfset newRate.Code = Service[i].ID.XmlAttribute>
<cfset newRate.Descr = Service[i].SvcDescription.XmlText>
<cfset newRate.Price = Service[i].Postage.XmlText>
I have tried every combination I can think of to get at the ID property, but nothing works.
Can you help?
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This returns an array:
<cfset newRate.Code = xmlSearch(Service[i], "/@ID")>
You can view the real XML here;
https://secure.thelowertowngroup.com/steinair/usps/usps_rates_international.cfm
<cfset newRate.Code = Service[i].ID.XmlAttribute.xmlText>
? – charliegrieferService[i].XMLAttributes.ID
? (doing this as comments rather than answers since I'm WAG'ing it a bit) – charliegriefer