FILTERXML function
The FILTERXML function returns specific data from XML content by using the specified xpath.
Extract matching elements or attributes from XML using an XPath selector. Browser practice runs locally and returns multiple matches as a vertical spill. Native FILTERXML is available in Windows Excel, not Excel for Mac or Excel for the web. Local practice accepts one XML string and one node-set selector (up to 1,024 characters); DTDs, scalar XPath results and range broadcasting are outside its contract. English decimal/scientific text becomes a number; other text stays text. Windows locale-specific date/currency conversion and native workbook recalculation remain unverified.
Syntax
FILTERXML(xml, xpath)Square brackets indicate optional arguments.
Arguments
| Argument | Required | Meaning |
|---|---|---|
| xml | Yes | A string in valid XML format."<root><item>value</item></root>" |
| xpath | Yes | A string in standard XPath format."//item" |
Try FILTERXML
Fix an incomplete XPath predicate
=FILTERXML(A2,B2)The opening bracket has no closing predicate. XML parsing succeeds but XPath parsing fails, returning #VALUE!. Replace the selector with /orders/order[1]/@id to extract PO-18.
Inspect the current formula
Read its written arguments or observe actual operation values in a separate local calculation. This action neither applies a draft nor grades an answer.
Read the formula, one argument at a time
Explore the written function calls and their inputs. The calculation result belongs to the complete formula.
FILTERXML · top-level call
=FILTERXML(A2,B2)Follow the cells behind a result
Read explicit local references and helper formulas using a separate calculation. Your draft stays in this field; the worksheet and practice checks do not change.
The worksheet runs locally. Published checks apply to the supplied example only. Native Excel and Google Sheets compatibility remain unverified.
Reference and compatibility
Univer 1.0.4 / Apache-2.0. Calculation checks cover the supplied examples only. The browser worksheet does not implement every Excel feature, external service or connected data type.