MACROMEDIA COLFUSION MX 7-CFML Reference page 921

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

XmlSearch
Description
Uses an XPath language expression to search an XML document object.
Returns
An array of XML object nodes that match the search criteria.
Category
XML functions
Function syntax
XmlSearch(xmlDoc, xPathString)
See also
,
,
cfxml
IsXML
XmlChildPos
in ColdFusion MX Developer's Guide
History
ColdFusion MX 7: Added support for attribute searches.
ColdFusion MX: Added this function.
Parameters
Parameter
xmlDoc
xPathString
Usage
The
XmlSearch
expressions that return one or more XML nodes and attribute searches. XPath expressions that
return any other type of value, such as a string, number, or Boolean, generate errors.
XPath is specified by the World Wide Web Consortium (W3C). For detailed information on
XPath, including XPath expression syntax, see the W3C website at www.w3.org/TR/xpath.
Example
The following example extracts the elements named last, which contain employee last names,
from an XML file, and displays the names.
The employeesimple.xml file contains the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<employee>
<!-- A list of employees -->
<name EmpType="Regular">
<first>Almanzo</first>
<last>Wilder</last>
</name>
,
XmlParse
Description
XML document object
XPath expression
function does not support complete XPath syntax. It only supports XPath
,
; Chapter 35, "Using XML and WDDX"
XmlTransform
XmlSearch
921

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents