Select * FROM seasons order by id DESC "> Select images.image, images.id from images, seasonImage, seasons where images.id = seasonimage.imgid AND seasonImage.seasonID = seasons.id AND seasons.id = #getSeasons.id# order by images.id ASC "> #image#"> ">
"> and here is the xml it made from the db .... crypto_snap.jpgcrypto_success.jpgIMG_605.jpgebt07.jpgebt14a.jpgebt14b.jpgebs01.jpgebt09.jpgebj01.jpgebt02.jpgebt03.jpg
let me know if that helps. You can defintely do what you are asking, and I'm pretty sure I understand. you have existing db and cf queries, that you want to use to create an XML doc that will be later read by flash. the xml doc created needs to match the format exactly to feed the flash movie. the above example will show you the old way. the new way .... well ... type xml coldfusion into google, or check out the livedocs example for MX. [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => dr_bozak [ip] => benjamin@websau [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 6 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> > > > > Select * FROM seasons order by id DESC > > > encoding=""UTF-8""?>"> > > > > Select images.image, images.id from images, seasonImage, seasons > where images.id = seasonimage.imgid AND seasonImage.seasonID = seasons.id > AND seasons.id = #getSeasons.id# order by images.id ASC > > id=""#currentSeason#"">"> > > #image#"> > > "> > >
"> > > > output="#thisString#"> > > > > > > and here is the xml it made from the db .... > > id="5">crypto_snap.jpgcrypto_success.jpg idName="pwned" id="4">IMG_605.jpg id="3">ebt07.jpgebt14a.jpgebt14b.jpg eason idName="Fresh" > id="2">ebs01.jpgebt09.jpg id="1">ebj01.jpgebt02.jpgebt03.jpg asons>
> > > > let me know if that helps. You can defintely do what you are asking, and I'm > pretty sure I understand. > you have existing db and cf queries, that you want to use to create an XML doc > that will be later read by flash. the xml doc created needs to match the format > exactly to feed the flash movie. > > the above example will show you the old way. > > the new way .... > > well ... > > type xml coldfusion into google, or check out the livedocs example for MX. > > > > > >[/quote] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Donna Casey [ip] => infoREMOVETHIS@ [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 7 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> > > > > Select * FROM seasons order by id DESC > > > encoding=""UTF-8""?>"> > > > > Select images.image, images.id from images, seasonImage, seasons > where images.id = seasonimage.imgid AND seasonImage.seasonID = seasons.id > AND seasons.id = #getSeasons.id# order by images.id ASC > > id=""#currentSeason#"">"> > > #image#"> > > "> > >
"> > > > output="#thisString#"> > > > > > > and here is the xml it made from the db .... > > id="5">crypto_snap.jpgcrypto_success.jpg idName="pwned" id="4">IMG_605.jpg id="3">ebt07.jpgebt14a.jpgebt14b.jpg eason idName="Fresh" > id="2">ebs01.jpgebt09.jpg id="1">ebj01.jpgebt02.jpgebt03.jpg asons>
> > > > let me know if that helps. You can defintely do what you are asking, and I'm > pretty sure I understand. > you have existing db and cf queries, that you want to use to create an XML doc > that will be later read by flash. the xml doc created needs to match the format > exactly to feed the flash movie. > > the above example will show you the old way. > > the new way .... > > well ... > > type xml coldfusion into google, or check out the livedocs example for MX. > > > > > >[/quote] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Donna Casey [ip] => infoREMOVETHIS@ [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 8 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> advice needed... cf write data to xml file for use in flash app thatuses xml file - Coldfusion Flash Integration

advice needed... cf write data to xml file for use in flash app thatuses xml file - Coldfusion Flash Integration

I'm wondering if it is possible to use CF to: 1) connect to existing db; 2) get specific data from table; 3) write it to an xml file that would follow a specific format and include the output data; 4) that a flash newsticker (flashloaded.com's newsticker) could use I ask because I want to use the flashloaded newsticker app and this project already has a database and can be hosted on an existing cf server. So I guess I am asking how hard it would be for qualified cf developer to write out the data to the xml file? The ...

  1. #1

    Default advice needed... cf write data to xml file for use in flash app thatuses xml file

    I'm wondering if it is possible to use CF to:

    1) connect to existing db;
    2) get specific data from table;
    3) write it to an xml file that would follow a specific format and
    include the output data;
    4) that a flash newsticker (flashloaded.com's newsticker) could use

    I ask because I want to use the flashloaded newsticker app and this
    project already has a database and can be hosted on an existing cf
    server. So I guess I am asking how hard it would be for qualified cf
    developer to write out the data to the xml file? The ticker reads a
    static xml file, so if cf can write that, I can tell the project manager
    that the solution is feasible and reasonable budget-wise.

    I'm no cf developer, but shouldn't you be able to have coldfusion write
    a static file using any tags you tell it to, putting the text (data) in
    them?

    Advice sought and appreciated. thanks!

    Donna
    Donna Casey Guest

  2. #2

    Default Re: advice needed... cf write data to xml file for usein flash app that uses xml file

    yeah .. this is real easy.

    if you have cf 5 or earlier, you can just translate your existing xml doc into
    a db, and then write a query, that builds a string and outputs to a file.

    in cf 6.1 and later (i think)
    you can just tell Cf that you want the query returned as xml


    either way, it works easily.
    I have only experience with the old method, but it;s not very tough. I think
    it took me an hour.



    dr_bozak Guest

  3. #3

    Default Re: advice needed... cf write data to xml file for use in flashapp that uses xml file

    dr_bozak wrote:
    > yeah .. this is real easy.
    >
    > if you have cf 5 or earlier, you can just translate your existing xml doc into
    > a db, and then write a query, that builds a string and outputs to a file.
    >
    > in cf 6.1 and later (i think)
    > you can just tell Cf that you want the query returned as xml
    >
    >
    > either way, it works easily.
    > I have only experience with the old method, but it;s not very tough. I think
    > it took me an hour.
    >
    >
    >
    Thanks, dr_bozak. What I am wondering about is just the opposite--there
    already is a database and an application that is written in CF to query
    the data and then put it in an html page... there are also admin pages
    to write to the database (to add content)

    Instead, I want to display that same data from the cf query in the
    flashloaded.com newsticker app, which reads an xml file. So, the
    question is how feasible it is to get CF to query the db and write out
    that data into the xml page or, if easier, to simply create the xml page
    with the required tags and data?

    The xml file uses the typical assortment of tags:

    <?xml version="1.0" ?>
    <ticker>
    <topic>
    <text>
    <![CDATA[
    <b>June 28, 2005 <br /><font color="#FFFFFF">blah,
    blah</font></b><br><i>blah, blah</i>]]>
    </text>
    <link>http://www.mydomain.com/whereever.cfm</link>
    <target>_self</target>
    <targetIsUrl>Y</targetIsUrl>
    </topic>
    </ticker>

    Possible?

    tia, Donna

    Donna Casey Guest

  4. #4

    Default Re: advice needed... cf write data to xml file for use in flashapp that uses xml file

    What I am curious about is whether CF can

    1) write to an existing xml file?
    2) write a new xml file?
    3) what is the method used assuming the general assortment of data, like
    #tickerdate# #tickernewstext# and #tickerlink#, blah, blah?

    I am assuming that it actually writes the content, but can it also write
    the necessary tags required by the flash app, or would you use some sort
    of template that already has those or would you concactenate the tags
    with the data references to produce a string that is then written to an
    xml file?

    Like I said, I'm no backend developer, but I have a general picture of
    how it works and just want to be solid in saying what will or won't work
    and how.

    thanks so much all,
    Donna
    Donna Casey Guest

  5. #5

    Default Re: advice needed... cf write data to xml file for usein flash app that uses xml file

    1) write to an existing xml file?

    2) write a new xml file?
    3) what is the method used assuming the general assortment of data, like
    #tickerdate# #tickernewstext# and #tickerlink#, blah, blah?

    I am assuming that it actually writes the content, but can it also write
    the necessary tags required by the flash app, or would you use some sort
    of template that already has those or would you concactenate the tags
    with the data references to produce a string that is then written to an
    xml file?

    Like I said, I'm no backend developer, but I have a general picture of
    how it works and just want to be solid in saying what will or won't work
    and how.

    thanks so much all,
    Donna


    dr_bozak Guest

  6. #6

    Default Re: advice needed... cf write data to xml file for usein flash app that uses xml file

    1) write to an existing xml file?
    * Yes. you use cffile to do this.
    2) write a new xml file?
    * again, you use CFFILE to do this

    3) what is the method used assuming the general assortment of data, like
    #tickerdate# #tickernewstext# and #tickerlink#, blah, blah?
    * as I mentioned, you can query your db to retrieve the data in your existing
    DB, and write it out as XML to match your existing doent.

    I am assuming that it actually writes the content, but can it also write
    the necessary tags required by the flash app,
    *tags aside from XML?

    or would you use some sort
    of template that already has those or would you concactenate the tags
    with the data references to produce a string that is then written to an
    xml file?
    * thats the old school way to do it. which is how I did it, (pre MX)

    check out how I did it: this is coming from a single table, but should show
    you one method. again, with CFMX there is cleaner way to do it (although this
    method for me produced a pretty xml doc that looked right, but must have had
    extra charcters in it, as it didn't work)


    <!----- heres the code ---->

    <cfset thisDS = "everb">
    <cfquery datasource="#thisDS#" name="getSeasons">
    Select * FROM seasons order by id DESC
    </cfquery>

    <cfset thisString = "<?xml version=""1.0""
    encoding=""UTF-8""?><everb><seasons>">
    <cfloop query="getSeasons">
    <cfset currentSeason = (getSeasons.recordcount+1) - getSeasons.currentrow>
    <cfquery datasource="everb" name="getSeasonPics">
    Select images.image, images.id from images, seasonImage, seasons
    where images.id = seasonimage.imgid AND seasonImage.seasonID = seasons.id
    AND seasons.id = #getSeasons.id# order by images.id ASC
    </cfquery>
    <cfset thisString = thisString & "<season idName=""#seasonname#""
    id=""#currentSeason#"">">
    <cfloop query="getSeasonPics">
    <cfset thisString = thisString & "<img>#image#</img>">
    </cfloop>
    <cfset thisString = thisString & "</season>">
    </cfloop>
    <cfset thisString = thisString & "</seasons><main><nav idName=""everB
    Profile""></nav><nav idName=""Stores""></nav><nav
    idName=""Contact""></nav></main></everb>">


    <cffile action="write" file="#thepath#\everb.xml" nameconflict="overwrite"
    output="#thisString#">
    </cffile>

    <!--- end of code ---->


    and here is the xml it made from the db ....

    <?xml version="1.0" encoding="UTF-8"?><everb><seasons><season idName="season5"
    id="5"><img>crypto_snap.jpg</img><img>crypto_success.jpg</img></season><season
    idName="pwned" id="4"><img>IMG_605.jpg</img></season><season idName="season3"
    id="3"><img>ebt07.jpg</img><img>ebt14a.jpg</img><img>ebt14b.jpg</img></season><s
    eason idName="Fresh"
    id="2"><img>ebs01.jpg</img><img>ebt09.jpg</img></season><season idName="You own
    dawg"
    id="1"><img>ebj01.jpg</img><img>ebt02.jpg</img><img>ebt03.jpg</img></season></se
    asons><main><nav idName="everB Profile"></nav><nav idName="Stores"></nav><nav
    idName="Contact"></nav></main></everb>



    let me know if that helps. You can defintely do what you are asking, and I'm
    pretty sure I understand.
    you have existing db and cf queries, that you want to use to create an XML doc
    that will be later read by flash. the xml doc created needs to match the format
    exactly to feed the flash movie.

    the above example will show you the old way.

    the new way ....

    well ...

    type xml coldfusion into google, or check out the livedocs example for MX.






    dr_bozak Guest

  7. #7

    Default Re: advice needed... cf write data to xml file for use in flashapp that uses xml file

    Thanks! I haven't had time to check this out, but it looks like what I
    thought would work. When I get time to put it together, I'll get back to
    you with the results...

    I'd give you my first-born, but she's 27 and her husband might object!

    donna

    dr_bozak wrote:
    > 1) write to an existing xml file?
    > * Yes. you use cffile to do this.
    > 2) write a new xml file?
    > * again, you use CFFILE to do this
    >
    > 3) what is the method used assuming the general assortment of data, like
    > #tickerdate# #tickernewstext# and #tickerlink#, blah, blah?
    > * as I mentioned, you can query your db to retrieve the data in your existing
    > DB, and write it out as XML to match your existing doent.
    >
    > I am assuming that it actually writes the content, but can it also write
    > the necessary tags required by the flash app,
    > *tags aside from XML?
    >
    > or would you use some sort
    > of template that already has those or would you concactenate the tags
    > with the data references to produce a string that is then written to an
    > xml file?
    > * thats the old school way to do it. which is how I did it, (pre MX)
    >
    > check out how I did it: this is coming from a single table, but should show
    > you one method. again, with CFMX there is cleaner way to do it (although this
    > method for me produced a pretty xml doc that looked right, but must have had
    > extra charcters in it, as it didn't work)
    >
    >
    > <!----- heres the code ---->
    >
    > <cfset thisDS = "everb">
    > <cfquery datasource="#thisDS#" name="getSeasons">
    > Select * FROM seasons order by id DESC
    > </cfquery>
    >
    > <cfset thisString = "<?xml version=""1.0""
    > encoding=""UTF-8""?><everb><seasons>">
    > <cfloop query="getSeasons">
    > <cfset currentSeason = (getSeasons.recordcount+1) - getSeasons.currentrow>
    > <cfquery datasource="everb" name="getSeasonPics">
    > Select images.image, images.id from images, seasonImage, seasons
    > where images.id = seasonimage.imgid AND seasonImage.seasonID = seasons.id
    > AND seasons.id = #getSeasons.id# order by images.id ASC
    > </cfquery>
    > <cfset thisString = thisString & "<season idName=""#seasonname#""
    > id=""#currentSeason#"">">
    > <cfloop query="getSeasonPics">
    > <cfset thisString = thisString & "<img>#image#</img>">
    > </cfloop>
    > <cfset thisString = thisString & "</season>">
    > </cfloop>
    > <cfset thisString = thisString & "</seasons><main><nav idName=""everB
    > Profile""></nav><nav idName=""Stores""></nav><nav
    > idName=""Contact""></nav></main></everb>">
    >
    >
    > <cffile action="write" file="#thepath#\everb.xml" nameconflict="overwrite"
    > output="#thisString#">
    > </cffile>
    >
    > <!--- end of code ---->
    >
    >
    > and here is the xml it made from the db ....
    >
    > <?xml version="1.0" encoding="UTF-8"?><everb><seasons><season idName="season5"
    > id="5"><img>crypto_snap.jpg</img><img>crypto_success.jpg</img></season><season
    > idName="pwned" id="4"><img>IMG_605.jpg</img></season><season idName="season3"
    > id="3"><img>ebt07.jpg</img><img>ebt14a.jpg</img><img>ebt14b.jpg</img></season><s
    > eason idName="Fresh"
    > id="2"><img>ebs01.jpg</img><img>ebt09.jpg</img></season><season idName="You own
    > dawg"
    > id="1"><img>ebj01.jpg</img><img>ebt02.jpg</img><img>ebt03.jpg</img></season></se
    > asons><main><nav idName="everB Profile"></nav><nav idName="Stores"></nav><nav
    > idName="Contact"></nav></main></everb>
    >
    >
    >
    > let me know if that helps. You can defintely do what you are asking, and I'm
    > pretty sure I understand.
    > you have existing db and cf queries, that you want to use to create an XML doc
    > that will be later read by flash. the xml doc created needs to match the format
    > exactly to feed the flash movie.
    >
    > the above example will show you the old way.
    >
    > the new way ....
    >
    > well ...
    >
    > type xml coldfusion into google, or check out the livedocs example for MX.
    >
    >
    >
    >
    >
    >
    Donna Casey Guest

  8. #8

    Default Re: advice needed... cf write data to xml file for use in flashapp that uses xml file

    Hello, again, dr_bozak
    I'm taking a look at this now and I think I understand it. My question is :
    Do I put my modified version (with my ds, query and xml requirements) in
    the HEAD of the page that runs the flash app that reads the resulting
    xml file?
    Or would the database need to be queried before the flash app page is
    loaded into the browser (for example, the flash app will be an element
    on the homepage of the site, so would it run as the homepage loads or do
    I send the user through another page that triggers the xml file write
    and directs the user to the "real" homepage)?

    Donna

    dr_bozak wrote:
    > 1) write to an existing xml file?
    > * Yes. you use cffile to do this.
    > 2) write a new xml file?
    > * again, you use CFFILE to do this
    >
    > 3) what is the method used assuming the general assortment of data, like
    > #tickerdate# #tickernewstext# and #tickerlink#, blah, blah?
    > * as I mentioned, you can query your db to retrieve the data in your existing
    > DB, and write it out as XML to match your existing doent.
    >
    > I am assuming that it actually writes the content, but can it also write
    > the necessary tags required by the flash app,
    > *tags aside from XML?
    >
    > or would you use some sort
    > of template that already has those or would you concactenate the tags
    > with the data references to produce a string that is then written to an
    > xml file?
    > * thats the old school way to do it. which is how I did it, (pre MX)
    >
    > check out how I did it: this is coming from a single table, but should show
    > you one method. again, with CFMX there is cleaner way to do it (although this
    > method for me produced a pretty xml doc that looked right, but must have had
    > extra charcters in it, as it didn't work)
    >
    >
    > <!----- heres the code ---->
    >
    > <cfset thisDS = "everb">
    > <cfquery datasource="#thisDS#" name="getSeasons">
    > Select * FROM seasons order by id DESC
    > </cfquery>
    >
    > <cfset thisString = "<?xml version=""1.0""
    > encoding=""UTF-8""?><everb><seasons>">
    > <cfloop query="getSeasons">
    > <cfset currentSeason = (getSeasons.recordcount+1) - getSeasons.currentrow>
    > <cfquery datasource="everb" name="getSeasonPics">
    > Select images.image, images.id from images, seasonImage, seasons
    > where images.id = seasonimage.imgid AND seasonImage.seasonID = seasons.id
    > AND seasons.id = #getSeasons.id# order by images.id ASC
    > </cfquery>
    > <cfset thisString = thisString & "<season idName=""#seasonname#""
    > id=""#currentSeason#"">">
    > <cfloop query="getSeasonPics">
    > <cfset thisString = thisString & "<img>#image#</img>">
    > </cfloop>
    > <cfset thisString = thisString & "</season>">
    > </cfloop>
    > <cfset thisString = thisString & "</seasons><main><nav idName=""everB
    > Profile""></nav><nav idName=""Stores""></nav><nav
    > idName=""Contact""></nav></main></everb>">
    >
    >
    > <cffile action="write" file="#thepath#\everb.xml" nameconflict="overwrite"
    > output="#thisString#">
    > </cffile>
    >
    > <!--- end of code ---->
    >
    >
    > and here is the xml it made from the db ....
    >
    > <?xml version="1.0" encoding="UTF-8"?><everb><seasons><season idName="season5"
    > id="5"><img>crypto_snap.jpg</img><img>crypto_success.jpg</img></season><season
    > idName="pwned" id="4"><img>IMG_605.jpg</img></season><season idName="season3"
    > id="3"><img>ebt07.jpg</img><img>ebt14a.jpg</img><img>ebt14b.jpg</img></season><s
    > eason idName="Fresh"
    > id="2"><img>ebs01.jpg</img><img>ebt09.jpg</img></season><season idName="You own
    > dawg"
    > id="1"><img>ebj01.jpg</img><img>ebt02.jpg</img><img>ebt03.jpg</img></season></se
    > asons><main><nav idName="everB Profile"></nav><nav idName="Stores"></nav><nav
    > idName="Contact"></nav></main></everb>
    >
    >
    >
    > let me know if that helps. You can defintely do what you are asking, and I'm
    > pretty sure I understand.
    > you have existing db and cf queries, that you want to use to create an XML doc
    > that will be later read by flash. the xml doc created needs to match the format
    > exactly to feed the flash movie.
    >
    > the above example will show you the old way.
    >
    > the new way ....
    >
    > well ...
    >
    > type xml coldfusion into google, or check out the livedocs example for MX.
    >
    >
    >
    >
    >
    >
    Donna Casey Guest

Similar Threads

  1. Replies: 0
    Last Post: November 27th, 09:13 AM
  2. Flash Player won't write .SOL file
    By John J-Z in forum Macromedia Flash Player
    Replies: 0
    Last Post: November 4th, 06:03 PM
  3. write value from flash file to an external file
    By art-v in forum Macromedia Flash Data Integration
    Replies: 2
    Last Post: December 26th, 10:03 PM
  4. How do I p a txt File and write data into aDatabase
    By Winston2 in forum Coldfusion - Advanced Techniques
    Replies: 0
    Last Post: July 1st, 12:56 PM
  5. Write to file with flash
    By Menashe-bezeq in forum Macromedia Flash
    Replies: 2
    Last Post: October 12th, 04:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •