I'm trying to output dynamically generated links from a RSS feed, but I
don't know how to refer to the href property of an XML tag in the
output page of the feed. When the XML input is like <entry>
<title>Latest CD releases as of June 12, 2007</title></entry>, the
code is #xmlDoc.feed.entry.title.xmlText#, but now I want to output
the href property of a link tag in the XML, like this: <entry><link
rel="alternate" type="text/html" href="entertainment/2007/06/latest_cd_releases_as_of_june.html" /></
entry>
I'm getting a java error when I try: #xmlDoc.feed.entry
.link.href.xmlText#
Here's the actual code from the XML page and the feed output page:
XML PAGE CODE (INPUT)
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="<entry>
<link rel="alternate" type="text/html" href="entertainment/2007/06/latest_cd_releases_as_of_june.html" />
</entry>
</feed>
RSS OUTPUT PAGE CODE (OUTPUT):
<cfhttp url="method="get" timeout="5" path="D:\GearHost\HostingAccounts
\metaphiz7\ file="nola_entertainment.rdf" />
<cffile action="read" file="D:\GearHost\HostingAccounts\metaphiz7
\ variable="FileContent">
<cfset xmlDoc = XMLParse(filecontent)>
<cfoutput>
<cfloop from="1" to="#ArrayLen(xmlDoc.feed.entry)#" index="i">
<cfset gDate = Len(xmlDoc.feed.entry.published.xmlText) - 6>
<a href="#xmlDoc.feed.entry.link.xmlText#">Read More</a></
td></tr><tr><td> </td></tr>
</cfloop>
</cfoutput>
don't know how to refer to the href property of an XML tag in the
output page of the feed. When the XML input is like <entry>
<title>Latest CD releases as of June 12, 2007</title></entry>, the
code is #xmlDoc.feed.entry.title.xmlText#, but now I want to output
the href property of a link tag in the XML, like this: <entry><link
rel="alternate" type="text/html" href="entertainment/2007/06/latest_cd_releases_as_of_june.html" /></
entry>
I'm getting a java error when I try: #xmlDoc.feed.entry
.link.href.xmlText#
Here's the actual code from the XML page and the feed output page:
XML PAGE CODE (INPUT)
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="<entry>
<link rel="alternate" type="text/html" href="entertainment/2007/06/latest_cd_releases_as_of_june.html" />
</entry>
</feed>
RSS OUTPUT PAGE CODE (OUTPUT):
<cfhttp url="method="get" timeout="5" path="D:\GearHost\HostingAccounts
\metaphiz7\ file="nola_entertainment.rdf" />
<cffile action="read" file="D:\GearHost\HostingAccounts\metaphiz7
\ variable="FileContent">
<cfset xmlDoc = XMLParse(filecontent)>
<cfoutput>
<cfloop from="1" to="#ArrayLen(xmlDoc.feed.entry)#" index="i">
<cfset gDate = Len(xmlDoc.feed.entry.published.xmlText) - 6>
<a href="#xmlDoc.feed.entry.link.xmlText#">Read More</a></
td></tr><tr><td> </td></tr>
</cfloop>
</cfoutput>