First, I will say that I am no expert.  But, I thought you had to parse
the xml data (?)  I have to do this when pulling data via cfhttp.  With
CF-generated I can just call the webservice using cfinvoke, but my little
..Net service won't respond to cfinvoke, only cfhttp.  When you use cfhttp,
I *think* you have to parse it out.

<cftry>
        <cfhttp url="http://www.blahblah.com";> 
        </cfhttp>
        <cfset session.myData = cfhttp.fileContent> 
        <cfset myXMLData = XMLParse(session.myData)>
        <cfcatch type="any">
              <cfset x = cfcatch />
        </cfcatch>
</cftry>

#myXMLData.XAMArrayName.XMLRowName[i].XMLFieldName.XmlText#  
^ get this by looking at the xml tree and end with "xmlText" ^

[email protected] on Thursday, October 26, 2006 at 12:10 PM
-0800 wrote:
>Ok - Head scratching time.
>
>I am trying to parse XML from 3rd party websites for client websites.
>However - sometimes the wait can be painful - as they may be trying to
>get RSS from 4-5 different websites.  So idealy I want to temporarily
>save the remote file to the local server - and only look for an updated
>file every hour or so. I have had this working before - but recently run
>into trouble with the UTF-8 format - so I have to do some re-writes. 
>
>Here's the head scratcher - It parses fine if I take it directly from the
>source-  but after I save it locally - it crashes.  
>
>So - how should I/Can I save the file locally?  This is what i am doing:
>
>
><!---First: Get Original Feed --->
><cfhttp url="#qryGetRSSFeeds.RSSLink#" method="get" resolveurl="Yes"
>throwOnError="Yes"/>
><!--- Write A New One! --->
><cffile 
>action="write" 
>file="#SiteRootDir#\rss\#TheNewRSSFile#" 
>output="#cfhttp.filecontent#"
>charset="us-ascii">
></cffile>
>
>Is there a better way to get the file and save it?
>
>Thanks - Nick
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2171
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to