Thanks Roland for the extra explanations, makes more sense now.

I like CFWDDX, and agree with you. The issue here is that I need a readable
browser display of the data without having to call CF functions.

Thanks,
Jean


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Roland Collins
Sent: Wednesday, March 29, 2006 5:04 PM
To: [email protected]
Subject: RE: [CFCDev] Structure to XML

Well with WDDX, you don't define any serialization methods whatsoever - the
WDDX functions *are* the serialization mechanism.  By using a custom XML
conversion routine, you are creating your own serialization mechanism
instead of using one that's already built into the CF language.  Don't
forget - you'll also want a function to de-serialize that xml back to a
structure.

As far as browser display, adding a cfdump around a wddx packet displays it
extremely nicely.  Far nicer than raw xml.

<cfwddx action="cfml2wddx" input="#struct#" output="wddx"> <cfdump
var="#wddx#">

Obviously, if you really don't like WDDX, then don't use it.  It just seems
like a lot of effort to me to create your own version of something that's
already supported by CF.

Roland

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Jean Moniatte
Sent: Wednesday, March 29, 2006 7:41 PM
To: [email protected]
Subject: RE: [CFCDev] Structure to XML

Thanks a lot for the reply.

I know about WDDX, but reading a WDDX string give me headaches. Reading a
XML doc in e.g. a browser is much easier, and it is often well needed.

By using XML why would I define my own serialization more than by using
WDDX? The only definition I am responsible for is in the input structure
itself, and there is no way around that, be it with XML or WDDX. Did I miss
something?

Thanks
Jean
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Roland Collins
Sent: Wednesday, March 29, 2006 4:28 PM
To: [email protected]
Subject: RE: [CFCDev] Structure to XML

WDDX *is* XML.  It just happens to have a well-defined format, which is a
*good thing*.  In fact, there are WDDX libraries for just about every
language I can think of, so using it is almost a no-brainer given its strong
interoperability.  It also quite nicely handles just about any type of data
you can throw at it, including nested structures and arrays.  It is most
certainly a better path to pursue than defining your own serialization
format.

Roland

________________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Jean Moniatte
Sent: Wednesday, March 29, 2006 6:04 PM
To: [email protected]
Subject: RE: [CFCDev] Structure to XML

Thanks for the reply.
I need XML, not WDDX.
The function you pointed at works only for a structure of simple values. I
guess I can start from there and add support for structures of structures.
 
Thanks
Jean

________________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Shib71
Sent: Wednesday, March 29, 2006 2:57 PM
To: [email protected]
Subject: Re: [CFCDev] Structure to XML
If you're just using the XML for storage internal to the app, use cfwddx.
This tag allows you to convert any CF type (struct,array,query,int,etc), to
WDDX (an xml format), and back.

If you just want generic XML, use this function.

Blair
On 3/30/06, Jean Moniatte <[EMAIL PROTECTED] > wrote: 
Hello,
 
what is the best way to transform a CF structure into an XML object?
 
Thanks, sorry if this is off topic
 
Jean
UGAL.net
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email. 

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (
www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected] 

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected] 




----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]





----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]







----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]





----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to