FILTERXML in Collabora Office: Extract Values from a Known XML Document
Use Collabora FILTERXML with controlled XML and XPath, select one intended node, and isolate parsing from network retrieval when troubleshooting.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: With <report><status>Ready</status><total>42</total></report> in A2, =FILTERXML(A2;"/report/status") has documentation-based expected text Ready. The first argument must be valid XML, and the second must be a valid XPath expression.
Syntax and scope
=FILTERXML(XMLDocument; XPathExpression)
Both arguments are required strings or references containing strings. XMLDocument supplies the XML stream; XPathExpression selects the part to extract. FILTERXML does not itself specify a network address or retrieve a web page.
The vendor’s example combines it with WEBSERVICE and selects //lastBuildDate from an RSS response. That illustrates separation between fetching content and querying XML. The current contents and availability of that external feed are not verified by this guide.
Example: a fully controlled local-text fixture
Put the following text in A2:
<report><status>Ready</status><total>42</total></report>
In B2 use =FILTERXML(A2;"/report/status"). The expected node content is Ready. Independently parsing the fixture and applying the XPath confirms that selection; no Collabora execution is claimed.
This example avoids external-service changes and date-dependent results. It also avoids ambiguity about numeric conversion by selecting a word. The total element contains characters “42”, but this guide does not certify every native text-versus-number coercion when extracting numeric-looking content.
Advanced example: select one matching record
Put this valid XML in A5:
<items><item code="A"><name>Alpha</name></item><item code="B"><name>Beta</name></item></items>
Use:
=FILTERXML(A5;"/items/item[@code='B']/name")
The documentation-based independent target is Beta. The predicate selects the item whose code attribute is B, and the final path selects its name element. The XPath string uses double quotes around the spreadsheet argument and single quotes around the attribute value.
For a positional control, =FILTERXML(A5;"/items/item[1]/name") has independent target Alpha. XPath positions in this example begin at one, not zero.
Advanced application: diagnose extraction separately from retrieval
If a combined web-and-XML formula fails, first preserve the returned response text in a separate cell or controlled fixture. Check whether it is actually XML rather than an HTML error page, a login page, or JSON.
Then test the intended XPath against a small known document like A2 or A5. This isolates a malformed path from a changed service response. A valid XPath can still select nothing if the XML structure or element names change.
LEN can provide a simple length check on retained text, but a nonzero length does not prove XML validity. LEFT can preview a prefix without treating the preview as the complete response.
XML structure and escaping matter
XML element and attribute names are case-sensitive in the independent XPath model. /report/status and /report/Status are different paths. The sample fixtures have no namespaces; default or prefixed namespaces require additional handling that the dedicated Collabora function page does not fully explain.
Text containing an ampersand must be represented appropriately in valid XML, such as &. Ordinary text pasted into an XML-shaped string is not necessarily a valid XML stream. Preserve the actual response rather than silently repairing it without recording the change.
Errors and compatibility limits
The dedicated section does not enumerate native error codes for malformed XML, invalid XPath, missing matches, multiple matches, namespaces, or scalar XPath results. This guide therefore uses single-node, namespace-free controls and does not promise automatic multi-cell spilling or a specific missing-node error.
The independent parser checks establish fixture syntax and intended XPath selection, not full implementation equivalence. FILTERXML is identified as outside OpenDocument 1.3 OpenFormula with namespace COM.MICROSOFT.FILTERXML; the namespace does not certify support in other products or in Collabora Online/mobile.
Availability and verification
The exact function is documented in Collabora Office 26.04 desktop help, retrieved and reviewed on October 17, 2026. This establishes a documentation scope, not the first release that introduced the function or the last version in which it works; those versions and any retirement date remain unestablished. Collabora Online and mobile support are not inferred from desktop help, nor is behavior in another spreadsheet product.
The examples are documentation-based expectations with independent calculations. They have not been executed in Collabora Office. No application screenshot or native error/coercion certification is implied. Formulas use English function names and semicolon argument separators.
References
- Collabora Office 26.04: FILTERXML (checked October 17, 2026).
- Editorial testing standards.