Skip to content

Commit 8377c01

Browse files
authored
document use of woodstox ReaderConfig (#580)
1 parent 7a0393f commit 8377c01

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,17 @@ Specifically:
2727
| Artifact | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.fasterxml.jackson.dataformat/jackson-dataformat-xml/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.fasterxml.jackson.dataformat/jackson-dataformat-xml) |
2828
| OSS Sponsorship | [![Tidelift](https://tidelift.com/badges/package/maven/com.fasterxml.jackson.dataformat:jackson-dataformat-xml)](https://tidelift.com/subscription/pkg/maven-com-fasterxml-jackson-dataformat-jackson-dataformat-xml?utm_source=maven-com-fasterxml-jackson-dataformat-jackson-dataformat-xml&utm_medium=referral&utm_campaign=readme) |
2929
| Javadocs | [![Javadoc](https://javadoc.io/badge/com.fasterxml.jackson.dataformat/jackson-dataformat-xml.svg)](http://www.javadoc.io/doc/com.fasterxml.jackson.dataformat/jackson-dataformat-xml) |
30-
| Code coverage (2.13) | [![codecov.io](https://codecov.io/github/FasterXML/jackson-dataformat-xml/coverage.svg?branch=2.13)](https://codecov.io/github/FasterXML/jackson-dataformat-xml?branch=2.13) |
31-
| CodeQ (LGTM.com) | [![LGTM alerts](https://img.shields.io/lgtm/alerts/g/FasterXML/jackson-dataformat-xml.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/FasterXML/jackson-dataformat-xml/alerts/) [![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/FasterXML/jackson-dataformat-xml.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/FasterXML/jackson-dataformat-xml/context:java) |
30+
| Code coverage (2.15) | [![codecov.io](https://codecov.io/github/FasterXML/jackson-dataformat-xml/coverage.svg?branch=2.15)](https://codecov.io/github/FasterXML/jackson-dataformat-xml?branch=2.15) |
3231
| Fuzzing | [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/jackson-dataformat-xml.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:jackson-dataformat-xml) |
3332

3433
## Branches
3534

3635
`master` branch is for developing the next major Jackson version -- 3.0 -- but there
3736
are active maintenance branches in which much of development happens:
3837

39-
* `2.14` is for developing the next minor 2.x version
38+
* `2.15` is for developing the next minor 2.x version
39+
* `2.14` is for backported fixes to include in 2.14.x patch versions
4040
* `2.13` is for backported fixes to include in 2.13.x patch versions
41-
* `2.12` is for backported fixes to include in 2.12.x patch versions
4241

4342
Older branches are usually not changed but are available for historic reasons.
4443
All released versions have matching git tags (`jackson-dataformats-text-2.9.4`).
@@ -55,7 +54,7 @@ To use Jackson 2.x compatible version of this extension on Maven-based projects,
5554
<dependency>
5655
<groupId>com.fasterxml.jackson.dataformat</groupId>
5756
<artifactId>jackson-dataformat-xml</artifactId>
58-
<version>2.13.0</version>
57+
<version>2.14.2</version>
5958
</dependency>
6059
```
6160

@@ -68,7 +67,7 @@ You can do this by adding this in your `pom.xml`:
6867
<dependency>
6968
<groupId>com.fasterxml.woodstox</groupId>
7069
<artifactId>woodstox-core</artifactId>
71-
<version>6.2.5</version>
70+
<version>6.5.0</version>
7271
</dependency>
7372
```
7473

@@ -116,6 +115,10 @@ XmlMapper mapper = new XmlMapper(xf); // there are other overloads too
116115
For configurable properties, you may want to check out
117116
[Configuring Woodstox XML parser](https://medium.com/@cowtowncoder/configuring-woodstox-xml-parser-woodstox-specific-properties-1ce5030a5173)
118117

118+
As the well as the Woodstox properties specified above, you can also call [WstxInputFactory#getConfig()](https://javadoc.io/doc/com.fasterxml.woodstox/woodstox-core/latest/com/ctc/wstx/stax/WstxInputFactory.html#getConfig--)
119+
and modify the [ReaderConfig](https://javadoc.io/doc/com.fasterxml.woodstox/woodstox-core/latest/com/ctc/wstx/api/ReaderConfig.html).
120+
One useful setting is the [maxElementDepth](https://javadoc.io/static/com.fasterxml.woodstox/woodstox-core/6.5.0/com/ctc/wstx/api/ReaderConfig.html#setMaxElementDepth-int-).
121+
119122
## Android quirks
120123

121124
Usage of this library on Android is currently not supported. This is due to the fact that the Stax API is unavailable on the Android platform, and attempts to declare an explicit dependency on the Stax API library will result in errors at build time (since the inclusion of the `javax.*` namespace in apps is restricted).

0 commit comments

Comments
 (0)