|
Ahhhhhhhhhhh !!!!!!!!!!!!!!!!!!!!!!!!!! :) THANK YOU VERY
VERY MUCH!!!!!!!!!!!!!
Bingo, that appears to be the trick. And the code I am using
is:
<cfset thisCount = GetContent.recordcount>
<cfset myquery = QueryNew("label, Perdate") ><!--- XML
Fields ---> <cfset temp = QueryAddRow(myquery,
#thisCount#)> <cfloop query="getcontent"> <!--- Loop over DB
and grab XML and Set Cell---> <cfset temp = QuerySetCell(myquery,
"label",
#GetContent.XmlFeed[getcontent.currentrow].contentdata.XmlChildren[1].common.label.XmlText#,
#getcontent.currentrow#)> <cfset temp = QuerySetCell(myquery,
"Perdate",
#DateFormat(XmlUnFormat(GetContent.XmlFeed[getcontent.currentrow].contentdata.XmlChildren[1].date.XmlText),
'MMMM DD, YYYY')#, #getcontent.currentrow#)> </cfloop>
<!--- My New Query---> <cfquery name="Perio"
dbtype="query"> SELECT
Perdate
, label FROM myquery ORDER BY Perdate Desc
</cfquery>
#Perio.label#<br />#Perio.date#
<hr />
Regards, Michael J. Sammut
________________________________________________ F O U R E Y E
S P R O D U C T I O N S think | plan | create :: web site
design & development :: NYC E. [EMAIL PROTECTED] | T: 718.254.9557 ext. 101 |
F: 718.254.0399
----- Original Message -----
Sent: Tuesday, March 11, 2003 10:01
AM
Subject: RE: [cf-xml] Sorting XML without
XSLT (Running it brain meltdown)
Michael -
There's a section in the documentation for
MX (chapter 30, Using XML and WDDX) which describes how to convert XML
into a query. If you're able to do that, you should be able to sort
it.
Steve
Hi again,
I am reposting again in case anyone can elaborate on a solution.
I am running in to brain meltdown and simple cannot figure out how to
manipulate this data.
I am storing XML in a SQL database and
using GetContent.XmlFeed[getcontent.currentrow].contentdata.XmlChildren[1].date.XmlText
as my retrieval method. Everything is working fine however, in some
cases I can not use XSLT because of some formatting limitations (actually
client peculiarities).
Can anyone lend some help in explaining how I may sort this without
XSLT? My page looks like this so
far:
<table cellspacing="0" cellpadding="0"
width="100%"> <cfloop
query="getcontent"> <cfif
GetContent.XmlFeed[getcontent.currentrow].contentdata.XmlChildren[1].live.XmlText
eq "yes" OR url.status eq
"live"> <tr> <td valign="top"
nowrap>#DateFormat(XmlUnFormat(GetContent.XmlFeed[getcontent.currentrow].contentdata.XmlChildren[1].date.XmlText),
'MMMM DD, YYYY')#</td> <td valign="top"><a
href="">#Ucase(XmlUnFormat(GetContent.XmlFeed[getcontent.currentrow].contentdata.XmlChildren[1].common.label.XmlText))#</a><br> <br></td> </tr> </cfif> </cfloop> </table>
It is working dandy, however, is there anyway I can sort this stuff
(alpha, date, etc?) without XSLT?
THANK YOU VERY MUCH!!!
Regards, Michael J. Sammut, Partner &
CTO ________________________________________________ F O U R E Y
E S P R O D U C T I O N S think | plan | create :: web
site design & development :: NYC E. [EMAIL PROTECTED] | T: 718.254.9557 ext.
101 | F: 718.254.0399
|