> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.utils.xml.XPath

- Component: `appmixer.utils.xml.XPath`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.utils.xml 1.0.8](https://connectors.appmixer.com/connector/appmixer.utils.xml/1.0.8.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.utils.xml/1.0.8/component/appmixer.utils.xml.XPath>

Extract data from XML using an XPath expression.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| XML (`xml`) | textarea | XML content. |
| XPath expression (`xpath`) | text | XPath expression. E.g. '//title'. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Result (`result`) | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.utils.xml.XPath",
  "author": "David Durman <david@client.io>",
  "description": "Extract data from XML using an XPath expression.",
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "xml": {
            "type": "string"
          },
          "xpath": {
            "type": "string"
          }
        }
      },
      "inspector": {
        "inputs": {
          "xml": {
            "type": "textarea",
            "label": "XML",
            "index": 1,
            "tooltip": "XML content."
          },
          "xpath": {
            "type": "text",
            "label": "XPath expression",
            "index": 2,
            "tooltip": "XPath expression. E.g. '//title'."
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "Result",
          "value": "result",
          "schema": {
            "type": "string",
            "example": "<to>Jane Doe</to>"
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
