Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 1064

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using Web Elements and External Objects
The XML document object
ColdFusion represents an XML document as an object, called an XML document object, that is much like a standard
ColdFusion structure. In fact, most ColdFusion structure functions, such as
document objects. For a full list of ColdFusion functions that work on XML document objects, see
object
management" on page 1069.
You can look at the overall structure of an XML document in two ways: a basic view and a DOM (Document Object
Model)-based node view. The basic view presents all the information in the document, but does not separate the data
into as fine-grained units as the node view. ColdFusion can access XML document contents using either view.
A simple XML document
The descriptions of the basic and node views use the following simple XML document. This document is used in many
of the examples in the ColdFusion XML documentation.
<?xml version="1.0" encoding="UTF-8"?>
<employee>
<!-- A list of employees -->
<name EmpType="Regular">
<first>Almanzo</first>
<last>Wilder</last>
</name>
<name EmpType="Contract">
<first>Laura</first>
<last>Ingalls</last>
</name>
</employee>
Basic view
The basic view of an XML document object presents the object as a container that holds one root element structure.
The root element can have any number of nested element structures. Each element structure represents an XML tag
(start tag/end tag set) and all its contents; it can contain additional element structures. A basic view of the simple XML
document looks like the following:
Document object
Root Element: employee
Comment: A list of employees
Element: name
Attributes: EmpType = Regular
Element: first
Text:
Almanzo
Element: name
Attributes: EmpType = Contract
Element: last
Element: first
Text:
Text:
Wilder
Laura
Last updated 1/20/2012
, work with XML
StructInsert
"Functions for XML
Element: last
Text:
Ingalls
1059

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents