You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/enrich-processor/xml-processor.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ $$$xml-options$$$
18
18
|`ignore_missing`| no |`false`| If `true` and `field` does not exist, the processor quietly exits without modifying the document. |
19
19
|`ignore_failure`| no |`false`| Ignore failures for the processor. When `true` and XML parsing fails, adds `_xmlparsefailure` tag to the document. See [Handling pipeline failures](docs-content://manage-data/ingest/transform-enrich/ingest-pipelines.md#handling-pipeline-failures). |
20
20
|`to_lower`| no |`false`| Convert XML element names and attribute names to lowercase. |
21
-
|`ignore_empty_value`| no |`false`| If `true`, the processor will filter out null and empty values from the parsed XML structure, including empty elements, elements with null values, and elements with whitespace-only content. |
21
+
|`remove_empty_values`| no |`false`| If `true`, the processor will filter out null and empty values from the parsed XML structure, including empty elements, elements with null values, and elements with whitespace-only content. |
22
22
|`remove_namespaces`| no |`false`| If `true`, removes namespace prefixes from element and attribute names. |
23
23
|`force_content`| no |`false`| If `true`, forces text content and attributes to always parse to a hash value with `#text` key for content. |
24
24
|`force_array`| no |`false`| If `true`, forces all parsed values to be arrays. Single elements are wrapped in arrays. |
@@ -37,7 +37,7 @@ $$$xml-options$$$
37
37
"xml": {
38
38
"field":"xml_field",
39
39
"target_field":"parsed_xml",
40
-
"ignore_empty_value":true
40
+
"remove_empty_values":true
41
41
}
42
42
}
43
43
```
@@ -94,7 +94,7 @@ Result:
94
94
95
95
### Filtering empty values
96
96
97
-
When `ignore_empty_value` is set to `true`, the processor will remove empty elements from the parsed XML:
97
+
When `remove_empty_values` is set to `true`, the processor will remove empty elements from the parsed XML:
98
98
99
99
```console
100
100
POST _ingest/pipeline/_simulate
@@ -105,7 +105,7 @@ POST _ingest/pipeline/_simulate
105
105
"xml": {
106
106
"field": "xml_content",
107
107
"target_field": "parsed_xml",
108
-
"ignore_empty_value": true
108
+
"remove_empty_values": true
109
109
}
110
110
}
111
111
]
@@ -624,7 +624,7 @@ The XML processor supports:
624
624
625
625
-**Elements with text content**: Converted to key-value pairs where the element name is the key and text content is the value
626
626
-**Nested elements**: Converted to nested JSON objects
627
-
-**Empty elements**: Converted to `null` values (can be filtered with `ignore_empty_value`)
627
+
-**Empty elements**: Converted to `null` values (can be filtered with `remove_empty_values`)
628
628
-**Repeated elements**: Converted to arrays when multiple elements with the same name exist at the same level
629
629
-**XML attributes**: Included as properties in the JSON object alongside element content. When an element has both attributes and text content, the text is stored under a special `#text` key
630
630
-**Mixed content**: Elements with both text and child elements include text under a special `#text` key while attributes and child elements become object properties
0 commit comments