ColdFusion Example

This is an example of performing a search with ColdFusion

<cfhttp url="http://sitename.screenstepslive.com/s/8788/m/27683/searches?text=searchtext"   
        username=“yourusername" password=“yourpassword">
   <cfhttpparam type="header" name="Accept" value="application/xml">
   <cfhttpparam type="header" name="Content-Type" value="application/xml">
</cfhttp>
<cfset result=xmlparse(cfhttp.filecontent)>
<cfset selectedElements = XmlSearch(result, "/lessons/lesson")>
<cfloop from="1" to="#arraylen(selectedElements)#" index="i">
   <cfoutput>
    <b><a href="#selectedElements[i].url.xmlText#">#selectedElements[i].title.xmlText#</a></b><br>
    #selectedElements[i].description.xmlText#
   </cfoutput>
   <br><br>
</cfloop>

0 Comments

Add your comment

E-Mail me when someone replies to this comment