Invalid XML declarations allowed

Open
#641 5 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
backend

Research direction

Start by reading the XML declaration handling in the parser and the existing tests for declarations; the issue does not name specific files. Check how the parser tracks whether it is at the start of the file and whether a declaration has already appeared. Done means declarations elsewhere in the file and repeated declarations are rejected, with tests covering both cases.

Written by the indexing model from the issue text.

Description

enhancement help wanted

The parser allows XML declarations anywhere in the file. If a declaration exists it should be at the very beginning of the file.

Also, only one declaration should be allowed.

Both of these constraints are not currently enforced.

More info on the validity of xml declarations is here.

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.