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

Convert XML Attributes To Elements

Turns each XML element's attributes into child elements, so attribute values survive a later XML parse that would otherwise drop them. 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 Attributes 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. A not IsMap(body) guard keeps it from re-running on an already-parsed 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 converted XML is written. Body is logs-only.

Target Field

OTTL Field

Yes *

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

Preserve Data Name attributes before parsing Windows Event XML

Bindplane docs - Convert XML Attributes To Elements - image 2

Configuration Tips

  • Run this before Parse Simplified XML whenever attributes carry real values (Windows Event Log <Data Name="..."> is the classic case). The simplified parser drops attributes, so promoting them first is what keeps the values.

Troubleshooting

Attribute values disappear after parsing

Symptoms: fields that came from XML attributes are missing from the parsed map.

Solutions:

  1. Place this processor before the parse step. Attributes only survive if they're promoted to elements first.

  2. Confirm the source still holds an XML string at this point in the pipeline (not an already-parsed map).

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?