Perform XPath queries with OS

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Opensearch Dashboards

Describe the issue:
I’ve got documents that contain XML content (document.content). I would like to perform a XPath search to find documents that contain XML that match the XPath.
Is there any decent way to do this with OS?

One option I’ve thought of is to use a script search with Java, where I can perform the XPath search with Java. I am not sure that is the best way or if it works.

Configuration:

Relevant Logs or Screenshots: