For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get XML

Extracts the XML node(s) matching an XPath from an XML string and writes them to a field you choose. The result is an XML string, so chain Parse Simplified XML after it if you want structured fields.

Supported Telemetry Types

Logs
Metrics
Traces

Choose Telemetry Type picks one signal per processor instance. Add another instance to handle a second signal.

Configuration

Basic Configuration

Bindplane docs - Get XML - image 1

Selection

Parameter
Type
Required
Default
Description

Choose Telemetry Type

Telemetry Selector

Yes

Logs

The signal this instance runs on: Logs, Metrics, or Traces (one at a time).

XPath

String

Yes

The XPath selecting the element(s) to extract. Applies to all selected telemetry types.

Condition

OTTL Condition

No

(empty)

Extract only from records that match. Empty runs on every record.

Source and target fields

Parameter
Type
Required
Default
Description

Source Field Type

Enum: Resource, Attribute, Body, Custom

Yes

Attribute

Where the XML string is read from. Body is logs-only. Custom takes any OTTL path.

Source Field

OTTL Field

Yes *

The field holding the XML. Bracket notation for nested fields. For a Body source, leave empty to use the whole body.

Target Field Type

Enum: Resource, Attribute, Body, Custom

Yes

Attribute

Where the extracted XML is written. Body is logs-only.

Target Field

OTTL Field

Yes *

Destination for the extracted XML. For a Body target, leave empty to use the whole body.

* The Body field type is the exception: it's optional, and leaving it empty targets the entire body.

Body is available for Logs only. For Metrics and Traces, the field type options are Resource, Attribute, and Custom.

Examples

Pull a subtree out for focused processing

Bindplane docs - Get XML - image 2

XPath with a quoted predicate

Bindplane docs - Get XML - image 3

Predicates often contain quoted strings. Enter the XPath exactly as written; embedded quotes are escaped safely when the config is generated, so they won't break the statement.

Configuration Tips

  • The result is an XML string. Chain Parse Simplified XML afterward to get addressable fields.

Troubleshooting

The target field is empty

Symptoms: nothing is written to the target.

Solutions:

  1. Verify the XPath matches at least one node in the source document.

  2. Confirm the source field holds valid XML and the Condition evaluates true.

Standalone Processor

Bindplane Resources

These XML and slice processors are designed to work together. Chain them to normalize, parse, and reshape XML end to end:

Last updated

Was this helpful?