Skip to content
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

Inconsistent behavior for event type IGNORABLE_WHITESPACE in XmlReader #128

Closed
sschirr opened this issue Mar 17, 2023 · 2 comments
Closed
Labels
indev The issue is fixed/implemented in the dev branch

Comments

@sschirr
Copy link
Contributor

sschirr commented Mar 17, 2023

Newline characters after a starting element and followed by another starting element will be detected as event type TEXT on most platform targets (native, android, js). Only on the jvm target it is (correctly) detected as a IGNORABLE_WHITESPACE.

I implemented a test for this case that is only passing on jvm target. See: #127

@pdvrieze
Copy link
Owner

The "default" implementation (rather than the platform independent implementation) uses the existing parsers for the platform (except native where the platform independent parser - based on android's one is used). I'll have a look at fixing this for the multiplatform parser.

@pdvrieze pdvrieze added the indev The issue is fixed/implemented in the dev branch label Mar 25, 2023
@pdvrieze
Copy link
Owner

pdvrieze commented Mar 25, 2023

The parser is schemaless and technically ignorable whitespace can only be determined in the context of a schema (technically only when there can not be values is the whitespace ignorable). But the handling now marks the text as ignorable if there is no text between tags (even if there could be text after a child tag).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
indev The issue is fixed/implemented in the dev branch
Projects
None yet
Development

No branches or pull requests

2 participants