[Looking for Charlie's main web site?]

Struggling with using the XML features of CFML? Here's where to learn more

Are you struggling with using the XML features in CFML? Or do you help people who are?

It's not something most people use often, and there is far more to the feature set than meets the eye. If you don't use the right resources to help you, you could waste time trying to piece together a solution using only scant examples you may find.

In this entry, I'll point to several resources you should consider to help get you quickly up to speed in using--and appreciating--the power of the XML features in CFML.

Even if you don't need them today, you (or someone you know) may need them some day, so keep this in mind. (Or if you find this page doing a google search some years down the road, drop a note to let me know if it helped then!)

Background

I just offered this info on a mailing list, but thought I'd repeat it here for readers and so that more people might find it more easily when searching.

Every once in a while someone will learn about, or need, or struggle with the XML features within CFML, which were introduced in ColdFusion MX (6). Sadly, many never notice them, or rarely use them so when folks struggle, there may not be too many people who can step up to help.

Often, people find only scant examples written by others and figure they have no choice but to try to piece together a solution, and they go through fits and starts, sometimes doing (or reading someone else doing) things in a more complicated way than is needed.

CFML's XML support is powerful, if you know where to look

The thing is, there are far more capabilities in ColdFusion's XML handling than may be obvious, even from many examples.

First, see the CFML docs--but not the CFML reference

So note first that there is significant documentation in the CFML Developer's Guide (NOT the CFML Reference). I make that distinction often, because some people seem only ever to notice the reference manual.

As is often the case, and especially for this topic, some features aren't reflected solely by specific tags or functions, but instead in ways to refer to objects as structures and arrays. The Developer's guide also is more of a user guide, walking you through "how" things work and why, rather than just showing syntax.

For CF8, that manual is here: CF 8 Developer's Guide

and the XML chapter is: Using XML and WDDX

For CF9, the manual is here: Developing Adobe ColdFusion 9 Applications

and the XML chapter (by the same name as before): Using XML and WDDX

Another great resource: Nate Weiss's mini book

While those may seem definitive, there was also an awesome extended article (about 30 pages, so more a mini book) written by Nate Weiss written back in 2002 on the then-new XML features of CFMX (6). It still is the best intro to the topic I've ever seen and one I still often recommend.

Sadly, it's gotten harder and harder to find online anymore. It used to be offered on the Adobe site, but the link no longer works. Fortunately, it's still available via the good 'ol "wayback machine". This link just worked for me.

But I've also now just gone and posted it my site instead, so that folks might find it more easily in the future:

Utilizing XML and XSLT in ColdFusion MX, by Nate Weiss (2002)

Final Resource: The CFWACK chapters

Finally, there are also chapters on XML processing in the Web Application Construction Kit books, for those who may have them.

See Chapters 45 and 46 in the second volume of the CF8 books, and chapters 41 and 42 in the second volume of the CF 9 books. (I was responsible for updating those chapters in the CF8 and 9 editions of the books, but they were written originally by Adam Churvis).

There may well be other great resources to commend, but these are are more than enough to get most people a lot further in their appreciation and understanding of using XML within CFML. (Still, see a couple of "related entries" as linked to right at the bottom of this entry.)

Hope all that helps someone.

Comments
Copyright ©2017 Charlie Arehart
Carehart Logo
BlogCFC was created by Raymond Camden. This blog is running version 5.005.
(Want to validate the html in this page?)

Managed Hosting Services provided by
Managed Dedicated Hosting