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

support StreamReadContraints maxStringSize #571

Closed
pjfanning opened this issue Feb 17, 2023 · 1 comment
Closed

support StreamReadContraints maxStringSize #571

pjfanning opened this issue Feb 17, 2023 · 1 comment

Comments

@pjfanning
Copy link
Member

  • FromXmlParser does not use TextBuffer to build up text so it does not benefit from the jackson-core support for ReadConstrainedTextBuffer
  • there are probably a few ways that support could be added to FromXmlParser
@cowtowncoder
Copy link
Member

Yeah. FWTW, Woodstox does have limits via:

https://cowtowncoder.medium.com/configuring-woodstox-xml-parser-woodstox-specific-properties-1ce5030a5173

including P_MAX_TEXT_LENGTH, but integrating that would be tricky.

So one possibility would be documentation.

In theory it'd be possible to -- with quite a bit of work -- change handling to avoid automatic text coalescing, which would usually make Stax implementation return text segments in smaller chunks. But that seems like a lot of work for questionable benefit. Plus it'd work at sort of wrong level too (in XML token stream, before becoming values).

So perhaps it may be necessary to just document which format backends do support StreamReadConstraints, in README.md of this and other dataformat repos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants