as usual, I'm using elephant guns to shoot mice. Oh well...

>>  there are many ways you could do it e.g. underscores map to
attributes, 

not underscores per se but certainly a keyword like "_READONLY" is a
dead give away it's an attribute of that node ie: "ADDR1" with
"ADDR1_READONLY". 

Thankfully none is particularly complex - it's to bring business logic
up to the UI with XMLHTTP (it's the lesser of many evils, I'm afraid...)

>> key values map to text nodes is the one you've done (not a bad one,
how 
would arrays work?)

Arrays? Presently I really only need to work with one record at a time,
although I could add a parent node I suppose: eg

<person entity="student" id="12345">
        <address addrtype="default">
                <!-- as per, etc -->
        </address>
        <address addrtype="postal">
                <!-- as per, etc -->            
        </address>
</parent>

Because this format will be used in a few areas, the XSLT way would
probably be more "robust" (and I'd learn more from doing so than using a
bunch of array and struct functions on the XML object)

any suggestions for resources to speed up the R&D? I've been alover
livedocs - it's a bit thin on this out there...

thanx
barry.b

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robin
Hilliard
Sent: Friday, 8 October 2004 8:57 PM
To: CFAussie Mailing List
Subject: [cfaussie] Re: struct to XML function, anyone?

Barry Beattie wrote:
> thanx for the memory jog, guys.
> 
> sadly, unlike a UDF, I can't tear the cfwddx tag apart to turn a
struct
> from this 
> 
> ADDR1 = "aaa"
> ADDR1_READONLY = "true"
> ADDR2 = "bbb"
> ADDR2_READONLY = "true"
> ADDR3 = "ccc"
> ADDR3_READONLY = "false"
> 
> to this (turning one dimentional data to 2D)
> 
> <ADDR1 readonly="true">aaa</ADDR1>
> <ADDR2 readonly="true">bbb</ADDR2>
> <ADDR3 readonly="false">ccc</ADDR3>
> 
> although, suppose I could rejig the cfwddx output, I suppose...
> 
> there really isn't a CF2XML function anywhere?

But Barry, which mapping would you pick - there are many ways you could 
do it e.g. underscores map to attributes, key names map to tag names, 
key values map to text nodes is the one you've done (not a bad one, how 
would arrays work?) but there could be many others.  Nice thing about 
wddx is that it's completely unambiguous, serialisation/deserialisation 
is built into CF and libraries for same in all major programming 
languages are up on openwddx.org.

This sort of leads in to the big hype exploder about XML - the important

thing is not that its in XML, but what schema/language etc it's in.  You

wouldn't see magazine issues devoted to the wonderful business 
opportunities presented by the us-ascii character set, but that's how it

seems sometimes with XML :-)

Robin
http://www.rocketboots.com.au

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to