ID EN
#Web

FILTERXML

Excel Functions

Get data from XML with Xpath

Syntax

EXCEL
=FILTERXML(xml, xpath)

Arguments

Parameter Description
xml Valid XML as a text string.
xpath A valid Xpath expression as a text string.

Return Value

Matching data as text

Details

The Excel FILTERXML function returns specific data from XML text using a specified XPath expression. XML is a text format for storing and transporting data. It is not dependent on any particular hardware or software. XML is extensible and is designed to transport data, as opposed to displaying data in a particular way. XML has strict syntax rules which allows software to traverse the structure of an XML document and perform various operations. XPath is a special query language for selecting the elements and attributes in an XML document. The FILTERXML function uses XPath to match and extract data from text in XML format. In the example shown, the cell contains XML that carries information about albums published as CDs. Each CD contains the title of the album, the name of the artist, and th

Examples

Example

In the example shown, the cell contains XML that carries information about albums published as CDs. Each CD contains the title of the album, the name

EXCEL
=FILTERXML(B5,"//cd/title")

See Also

WEBSERVICE ENCODEURL