Skip to content

Add XmlProcessor initial implementation #130337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

marc-gr
Copy link

@marc-gr marc-gr commented Jun 30, 2025

Adds a new Xml pipeline processor

Closes #97364

Copy link
Contributor

github-actions bot commented Jun 30, 2025

🔍 Preview links for changed docs:

🔔 The preview site may take up to 3 minutes to finish building. These links will become live once it completes.

@marc-gr marc-gr force-pushed the feat/xml-processor branch from 95df637 to 67dd264 Compare June 30, 2025 14:28
@marc-gr marc-gr requested a review from Copilot June 30, 2025 14:29
@marc-gr marc-gr marked this pull request as ready for review June 30, 2025 14:29
@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Jun 30, 2025
@marc-gr marc-gr added the Team:Security Meta label for security team label Jun 30, 2025
@elasticsearchmachine elasticsearchmachine removed the Team:Security Meta label for security team label Jun 30, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a new XML pipeline processor that parses XML into JSON-like maps using a streaming parser, with options for error handling, case conversion, and empty-value filtering.

  • Introduces XmlProcessor with configurable parsing options
  • Provides factory integration, plugin registration, and comprehensive unit tests
  • Updates module dependencies and documentation for the XML processor

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/XmlProcessor.java New processor implementation with streaming XML parsing
modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/XmlProcessorTests.java Unit tests covering parsing scenarios and options
modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/XmlProcessorFactoryTests.java Tests for factory config and defaults
modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/IngestCommonPlugin.java Registered XML processor in plugin
modules/ingest-common/src/main/java/module-info.java Added java.xml module requirement
docs/reference/enrich-processor/xml-processor.md Documentation for the XML processor
docs/reference/enrich-processor/toc.yml Added processor to TOC
docs/reference/enrich-processor/index.md Linked XML processor in index
Comments suppressed due to low confidence (2)

docs/reference/enrich-processor/xml-processor.md:12

  • [nitpick] Verify that the $$$xml-options$$$ macro is correct and renders all available XML processor options in the docs.
$$$xml-options$$$

modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/XmlProcessor.java:185

  • [nitpick] There are no tests for XML namespace handling. Consider adding a unit test with namespace-qualified elements to validate namespace awareness settings.
        factory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, false);

@marc-gr marc-gr added the :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP label Jul 1, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Jul 1, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine elasticsearchmachine removed the needs:triage Requires assignment of a team area label label Jul 1, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @marc-gr, I've created a changelog YAML for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >enhancement external-contributor Pull request authored by a developer outside the Elasticsearch team Team:Data Management Meta label for data/management team v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Ingest Pipeline] XML Processor
2 participants