question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docs do not explain how to set properties

See original GitHub issue

The docs do explain which properties should be set and roughly where:

Finding Property name definitions

Woodstox-specific property names are defined in 2 classes:

  • WstxInputProperties (to use via XMLInputFactory)
  • WstxOutputProperties (to use via XMLOutputFactory)

As with all properties, configuration is done using methods XMLInputFactory.setProperty() and XMLOutputFactory.setProperty().

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

but it does not explain how do actually do this (in my case on Jackson’s XMLMapper).

After searching through the interfaces for quite some time I found a solution I assume to work, it would be nice if this could be added to the documentation for easier access:

XmlMapper xmlMapper = new XmlMapper();
xmlMapper.getFactory().getXMLInputFactory().setProperty(WstxInputProperties.P_MAX_ATTRIBUTE_SIZE, Integer.MAX_VALUE);

Setting the value via system properties doesn’t seem to work (which was my first assumption).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cowtowncodercommented, Aug 22, 2018

I did change README of xml module:

https://github.com/FasterXML/jackson-dataformat-xml/

… oh. But I change 2.9 branch and hadn’t merged to master. Changed now. So that’s why confusion. Thank you for pointing this out.

0reactions
ST-DDTcommented, Aug 22, 2018

Oh. I haven’t noticed that. Then maybe add a few lines that explain how to configure those factories and how to set them to/use them with the XmlMapper?

Read more comments on GitHub >

github_iconTop Results From Across the Web

View or change the properties for an Office file
View and update properties and metadata for your documents.
Read more >
Video: Change document properties - Microsoft Support
Training: When you create an Office file, you can add properties or metadata to help you better ... To see more properties, select...
Read more >
How document properties and DocProperty fields work
You can insert the value of a document property in the document. You do so by inserting a field of the type DocProperty....
Read more >
Add a website property to Search Console - Google Support
A property is Search Console's term for a discrete thing that you can examine or manage ... Adding a property does not affect...
Read more >
Question: Document Properties (set in main process) are not ...
1. Document properties are set using Groovy script in main process. 2. Sub process is called to do some work and then the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found