There should be a configuration option for skipping non-meaningful text events in-between XML tags

Open
#461 0 comments 2 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
backend

Research direction

Start by reading the related issues #285 and #414 and the existing BOM stripping behavior in quick-xml. Then trace how the parser emits Text events between XML tags and identify where a configuration option could filter whitespace and preamble text. Done means the option handles those cases and replaces the current BOM stripping behavior.

Written by the indexing model from the issue text.

Description

enhancement

We should provide an option which would address https://github.com/tafia/quick-xml/issues/285#issuecomment-1199756671 by trimming away Text events that do not have meaning to XML (e.g. whitespace between elements, or text prior to the first XML open tag which may include a BOM character)

To a first approximation this option essentially filters out things which aren't relevant to the information payload of an XML document, such as formatting. This should replace the existing BOM stripping behavior.

Related to https://github.com/tafia/quick-xml/issues/285 and https://github.com/tafia/quick-xml/issues/414

Dominant language
Rust
Stars
1.6k
Forks
299
Avg merge
2d 4h
Merged PRs (30d)
9

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tafia/quick-xml

All issues in tafia/quick-xml

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.