This tutorial examines how to access the individual elements of an XML document in ColdFusion, if you have a reference to that document. Two ways to access the individual elements are demonstrated.
CFXML: Probing XMLDOM in ColdFusion - How do we get to the attributes? (Page 4 of 5 )
You dig a little deeper to get the attributes, which are also represented as a structure in ColdFusion as follows. Here I am trying to locate the attribute of the first child of the root element.
The above code will display the following on the browser.
How can we then access the individual students? Well, it is an extension of the same idea. We have to closely follow the Macromedia documentation to delineate the details as shown below for the second child of the root element. With more than one way to access, and with syntaxes that are quite different, it can be quite confusing, although it adds to flexibility.