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

Convert XML Text To Elements

Wraps the text inside XML elements in their own child elements, so mixed-content XML parses into clean, predictable fields. The output is still an 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 - Convert XML Text To Elements - image 1

When to apply

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).

Condition

OTTL Condition

No

(empty)

Convert only the 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 (full-record access).

Source Field

OTTL Field

Yes *

The field holding the XML. Use bracket notation for nested fields (parent["child"]). For a Body source, leave empty to use the whole body.

Target Field Type

Enum: Resource, Attribute, Body, Custom

Yes

Attribute

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

Target Field

OTTL Field

Yes *

Destination for the converted XML. Point it at the source field to convert 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

Mixed content normalized into child elements

The transformation in action: the text content of an XML element moves into a dedicated child element, so a later parse yields clean key/value pairs instead of mixed content.

Bindplane docs - Convert XML Text To Elements - image 2

Chained ahead of Parse Simplified XML

This is a string-to-string step, so it sits directly before Parse Simplified XML, normalizing the XML so the parse produces predictable fields.

Bindplane docs - Convert XML Text To Elements - image 3

Configuration Tips

  • This is a string-to-string step. To turn the result into addressable fields, chain Parse Simplified XML after it.

Troubleshooting

The output looks unchanged

Symptoms: the target field still holds the original XML.

Solutions:

  1. Confirm the source field holds an XML string, not an already-parsed map.

  2. Check the Condition. If it evaluates false for a record, the processor passes that record through untouched.

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?