demiancurran
Programmer
Hello,
I've been trying to display this xml information to a webpage but haven't had any success yet.
So far, I've been able to store all the page information into a variable called myXMLDoc, and successfully XMLsearched that variable... but now i'm having trouble displaying that array of information. Here's what i have so far.
When myItems is dumped .. it shows all the information intact in the array.
This is what I'm using to show the information. I'm not sure where to declare what xmltext to display
I'm confused as to how this array should be displayed to the screen.
I've been trying to display this xml information to a webpage but haven't had any success yet.
So far, I've been able to store all the page information into a variable called myXMLDoc, and successfully XMLsearched that variable... but now i'm having trouble displaying that array of information. Here's what i have so far.
Code:
<cfhttp url="[URL unfurl="true"]www.wowarmory.com/guild-info.xml?r=Gorgonnash&n=LOOM"[/URL] method="GET" resolveUrl="yes" useragent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2">
<cfset myXMLDoc = XMLParse(cfhttp.filecontent)>
<cfset myItems = XMLSearch(myXMLDoc, "page")>
<cfdump var="#myItems#">
When myItems is dumped .. it shows all the information intact in the array.
This is what I'm using to show the information. I'm not sure where to declare what xmltext to display
Code:
<cfscript>
selectedElements = XmlSearch(myxmldoc, "page");
for (i = 1; i LTE ArrayLen(selectedElements); i = i + 1)
writeoutput(selectedElements[i].guildinfo.XmlText & "<br>");
</cfscript>
I'm confused as to how this array should be displayed to the screen.