I am symathetic to your situation, there isn't much good info out there on
producing or parsing XML with CF, I'm trying to find time to put something
together myself at the moment.

Firstly, WDDX. WDDX is an XML format that Allaire are pushing. It's good as
it allows the transferance of complex data types (such as structures and
arrays) in XML. Using WDDX and a WDDX parser (it's built into CF and
avalilable as a COM object for other languages) you can deal directly with
the data structures and not worry about the complexity of serialising and
deserialising such structures. CF allows you to just specify a structure, an
array, or even a query (as well as other data types) and you just use the
CFWDDX tag to serialise and deseriaise it. WDDX is great for passing data
between CF pages and applications, for example in a shopping cart.

Having said (written?) all that, I'm not a big fan of WDDX as an XML format.
Other developers using different languages have been very reluctant to pick
up WDDX (in my experience). So, if you are producing an XML feed for others,
it's probably not the best idea to rely purely on it. Instead you could
write your own more "generic" form of XML sutiable for your purpose.
Producing this in CF is a piece of cake, just use CFCONTENT to set the mime
type, and then just ouptu your variable into your XML tags in a similar way
that you would with HTML.

Parsing XML (not WDDX though) is a whol new problem in CF though. In my
experience, I've been experimenting with using the Microsoft XMLDOM COM
object that comes with IE5 with reasonable success. I can then load the
values of the XML tags into a local CF Structure and manipulate them as I
want.

There are also a variety of other ways or producing and parsing XML with CF,
including using Java. Below is a list of links that I've found useful:

http://www.w3.org/TR/REC-xml - W3C XML Spec
http://msdn.microsoft.com/xml/xmlguide/dom-guide-document.asp - Using the MS
XMLDOM COM object
http://www.allaire.com/handlers/index.cfm?id=4683&method=full - Allaire
article involving WDDX
http://www.oacfug.org/dsp_Demos.cfm - WDDX Tutorial
http://www2.granularity.net/xml/ColdFusion/GIAXT/ - Granularitys CF XML
parser.
http://w.moreover.com/ - Good exampl of XML and WDDX implemetation.

Hope this helps,

Ben


-----Original Message-----
From: Akbar [mailto:[EMAIL PROTECTED]]
Sent: 28 June 2000 11:37
To: CF Talk (E-mail)
Subject: CF & XML ?


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hello all,

forgive me if i sound too naive. i have been programming in CF from
the past 1 yr and recently i am into XML. it feels good whenever i
read wat all XML can do and solve all those problems which we are not
aware of and all that stuff.

but when i get down to basics, i am unable to connect XML and CF. i
mean, i know that CF *somehow* supports XML. but i am not aware how
well and in wat way. i tried to find an answer at allaire site but
wat i got is a bunch of links to XML sites which were of not much
help. i tried to find some site which would describe the link between
XML and CF, but i couldnt get. may be i am not aware of it.

so can anyone explain or provide me links where all my Q's would be
answered?? to make it little bit more easy i would like to give an
example.

i have a XML file and which i am using as a part of EDI. and this
file i upload into the site. wat i want is that CF should be able to
parse this XML file and insert the data from the document to the SQL
DB. this is a simple example i was trying. does CF has its own
parser?? or do i have to depend on Java??

i have 1 more Q. in all this big picture. where does WDDX fit into??

i hope u ppl wont mind my long winded mail, bcoz i am just learning
now.

thanx in advance

akbar



-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.3

iQA/AwUBOVlmFbwnCrsqtpR6EQLv5gCdFJcWrcHHahIHoPpQjRMnHnsYxQAAnAxe
WXoE46sAYD/p5EuaRKD82d+s
=ghQW
-----END PGP SIGNATURE-----
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to