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

Remove XML

Removes the XML node(s) matching an XPath from an XML string. Use it to drop noisy or sensitive elements before parsing or forwarding. The output is the trimmed XML string.

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 - Remove 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 remove. Applies to all selected telemetry types.

Condition

OTTL Condition

No

(empty)

Remove 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 trimmed XML is written. Body is logs-only.

Target Field

OTTL Field

Yes *

Destination for the trimmed XML. Point it at the source to edit in place. 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

Strip a noisy subtree before parsing

Bindplane docs - Remove XML - image 2

Redact a sensitive element

Bindplane docs - Remove XML - image 3

XPath predicates with quoted strings are entered as-is; embedded quotes are escaped safely when the config is generated.

Configuration Tips

  • Removing elements before Parse Simplified XML shrinks the resulting map and keeps it focused.

Troubleshooting

Too much (or nothing) gets removed

Symptoms: the result keeps the element you wanted gone, or loses more than intended.

Solutions:

  1. Validate the XPath against a sample document. A broad expression can match more nodes than expected; a too-narrow one matches none (a silent no-op).

  2. Confirm the source 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?