FILTERXML - Function that returns specified data from XML content using the specified XPath in Excel

FILTERXML function: The function returns specified data from XML content using the specified XPath. Support functions from Excel 2013 onwards. Syntax: FILTERXML (xml, xpath)

The following article introduces you to the FILTERXML function - one of the functions in the Web function group is very popular in Excel.

Picture 1 of FILTERXML - Function that returns specified data from XML content using the specified XPath in Excel

Description: The function returns specified data from XML content using the specified XPath. Support functions from Excel 2013 onwards.

Syntax: FILTERXML (xml, xpath)

Inside:

- xml: A string in valid XML, is a required parameter.

- xpath: A string in standard XPath form, is a required parameter.

Attention:

- If xml is invalid -> the function returns the #VALUE! Error value

- If the xml contains a namespace with an invalid prefix -> the function returns the #VALUE! Error value

For example:

Determining the return value from the XML content returned in the URL string is described in the table below:

Picture 2 of FILTERXML - Function that returns specified data from XML content using the specified XPath in Excel

- Find the WEBSERVICE value from the above URL string. Enter the formula: = WEBSERVICE (D6)

Picture 3 of FILTERXML - Function that returns specified data from XML content using the specified XPath in Excel

- Press Enter -> return value is:

Picture 4 of FILTERXML - Function that returns specified data from XML content using the specified XPath in Excel

- The value returned from the XML content returned in the URL string. Enter the formula: = FILTERXML (D7, "// food / name")

Picture 5 of FILTERXML - Function that returns specified data from XML content using the specified XPath in Excel

- Press Enter -> the value returned from the XML content in the above URL string is:

Picture 6 of FILTERXML - Function that returns specified data from XML content using the specified XPath in Excel

Above are instructions and some specific examples when using the FILTERXML function in Excel.

Good luck!

Update 19 May 2020
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile