This works. Thanks!
Dave
----- Original Message -----
From: "tom dyson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 25, 2001 10:30 AM
Subject: Re: [cf-xml] SOXML and iSyndicate
> Hi Dave
>
> I'm not sure about soXML (the author's on this list - maybe he can
help...)
> but you can use CF_XMLQUERY to get what you want as follows:
>
> =====================
>
> <cfset myx = '<?xml version="1.0"?>
> <newsfeed>
> <channel cid="sporting_news.mlb.hl"
> title="The Sporting News: MLB"
> date="07/22/2001"
> time="12:28 PST">
> <headline
> href="http://shortenedurlforthispurpose.com"
> date="Tue, July 24, 2001 09:28 AM"
> time="09:28 PST">No. 1 overall pick Mauer has two hits in pro
debut
> </headline>
> </channel>
> </newsfeed>'>
>
> <cf_xmlquery xmldata = "#myx#"
> xpath = "channel/headline"
> name = "newq">
>
> <cfoutput query = "newq">
> headline: #headline#<br>
> URL: #headline_href#<br>
> Date: #headline_date#<br>
> Time: #headline_time#<br>
> </cfoutput>
>
> =====================
>
> I've written out the XML to make it explicit, but in your case you'd be
> better off accessing the URL directly from the tag:
>
> <cf_xmlquery
> xmldata = "http://headlines.isyndicate.com/someurl.xml"
> type = "url"
> xpath = "channel/headline"
> name = "newq">
>
> Hope this helps
>
> Tom
>
> -----------------+
> tom dyson
> t: +44 (0)1608 811870
> m: +44 (0)7958 752657
> [EMAIL PROTECTED]
> http://torchbox.com
>
> on 25/7/01 3:01 pm, Dave Hannum at [EMAIL PROTECTED] wrote:
>
> > Using SOXML (great tag) on iSyndicate feeds, I don't know how to handle
this
> > setup. Perhaps someone can tell me what I'm doing wrong.
> >
> > Thanks,
> > Dave
> >
> > =========== iSyndicate Feed ==================
> > <?xml version="1.0"?>
> > <newsfeed>
> >
> > <channel cid="sporting_news.mlb.hl"
> > title="The Sporting News: MLB"
> > date="07/22/2001"
> > time="12:28 PST">
> >
> > <headline
> > href="http://shortenedurlforthispurpose.com"
> > date="Tue, July 24, 2001 09:28 AM"
> > time="09:28 PST">No. 1 overall pick Mauer has two hits in pro debut
> > </headline>
> >
> > ================= My attempt to parse ================
> > <cf_SOXML
> > action="XML2CF"
> > input="http://headlines.isyndicate.com/someulr.xml"
> > output="stNewsHeadLines"
> > type="file">
> >
> > <CFLOOP INDEX="sFeed" FROM="1" TO="5">
> > <CFSCRIPT>
> > sFeed = sFeed;
> > sHeadline =
stNewsHeadlines.newsfeed.channel.headline[sFeed].Value;
> > sURL =
stNewsHeadlines.newsfeed.channel.headline[sFeed].href.Value;
> > </CFSCRIPT>
> > <CFOUTPUT>
> > #sHeadline#<BR>#sURL#<P>
> > </CFOUTPUT>
> > </CFLOOP>
> >
> > =========== Yields ====================
> > An error occurred while evaluating the expression:
> >
> >
> > sFeed = sFeed;
> > sHeadline = stNewsHeadlines.newsfeed.channel.headline[sFeed].Value;
> > sURL = stNewsHeadlines.newsfeed.channel.headline[sFeed].href.Value;
> >
> >
> >
> >
> > Error near line 18, column 2.
>
> --------------------------------------------------------------------------
--
> > ----
> >
> > The member "HREF" in dimension 1 of object
> > "stNewsHeadlines.newsfeed.channel.headline" cannot be found. Please,
modify
> > the member name.
> >
> >
> >
> > ===============================
> > David R Hannum
> > Ohio University
> > Web Analyst/Programmer
> > (740) 597-2524
> > [EMAIL PROTECTED]
>
>
> -----------------------+
> cf-xml mailing list
> [EMAIL PROTECTED]
> http://torchbox.com/xml
-----------------------+
cf-xml mailing list
[EMAIL PROTECTED]
http://torchbox.com/xml