1 / 16

Dealing with Remote Data

Dealing with Remote Data. 3 basic points Where is the data coming from? What format is the data in? What is the pattern for the exact data you want?. Where is the data coming from?. Email Web XML FTP NNTP Other. What format is the data in?. Plain text HTML XML CSV

siran
Download Presentation

Dealing with Remote Data

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dealing with Remote Data • 3 basic points • Where is the data coming from? • What format is the data in? • What is the pattern for the exact data you want?

  2. Where is the data coming from? • Email • Web • XML • FTP • NNTP • Other

  3. What format is the data in? • Plain text • HTML • XML • CSV • Other text formats • We will NOT be covering non-textual data

  4. What goes with what? • Email • Plain text (most common) • HTML • Web • Plain Text • HTML • XML • CSV

  5. What goes with what? • XML Feeds (RSS, etc) • XML • FTP • Any • NNTP • Plain text • HTML

  6. Google News Alerts • Email based on specified subjects • Title of email ALWAYS contains the search subject • Body in plain text • Has standard footer • 2 different formats for data

  7. Google News Alerts • Show email examples

  8. Google News Alerts • CFPOP to retrieve • <cfx_pop action="GETALL" name="qPop" startrow="1" maxrows="2" server="mail.cfregex.com" • username="XXX" password="XXX"> • <CFDUMp var="#qPop#"> • Always test your data before trying to work with it

  9. Google News Alerts • <CFIF Not IsDefined('qPop') OR Not qPop.Recordcount> • <CFABORT> • </CFIF> • Always stop operations when there is no data to work with

  10. Google News Alerts • Get the subject • <CFSET Subject=ReReplace(qPop.Subject, '^Google News Alert - ', '')> • Difference between find and replace • Find has to be parsed, replace just replaces what you don’t want with nothing

  11. Google News Alerts • Show code in studio

  12. Full as a Goog • XML feed • Retrieved using CFHTTP • Dates are in a strange format

  13. Full as a Goog • Show code

  14. Ebay Agent • Ebay changes ALL THE TIME • Different results if a cookie exists or not • Results in HTML • Uses CFHTTP to get data • HTML has to be parsed

  15. Ebay Agent • Show code

  16. More Information • Mdinowit@houseoffusion.com • House of Fusion • http://www.houseoffusion.com • CF-Talk, CF-RegEx, other HoF mailing lists • Fusion Authority • http://www.fusionauthority.com

More Related