JAXB Utils

The collection of useful JAXB utils

License

License

GroupId

GroupId

com.github.baev
ArtifactId

ArtifactId

jaxb-utils
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

JAXB Utils
The collection of useful JAXB utils
Source Code Management

Source Code Management

https://github.com/baev/jaxb-utils

Download jaxb-utils

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.baev/jaxb-utils/ -->
<dependency>
    <groupId>com.github.baev</groupId>
    <artifactId>jaxb-utils</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.baev/jaxb-utils/
implementation 'com.github.baev:jaxb-utils:1.0'
// https://jarcasting.com/artifacts/com.github.baev/jaxb-utils/
implementation ("com.github.baev:jaxb-utils:1.0")
'com.github.baev:jaxb-utils:jar:1.0'
<dependency org="com.github.baev" name="jaxb-utils" rev="1.0">
  <artifact name="jaxb-utils" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.baev', module='jaxb-utils', version='1.0')
)
libraryDependencies += "com.github.baev" % "jaxb-utils" % "1.0"
[com.github.baev/jaxb-utils "1.0"]

Dependencies

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
commons-io : commons-io jar 2.5

Project Modules

There are no modules declared in this project.

JAXB Utils

Sometimes when you use JAXB it may fall if XML contains some bad XML 1.0 characters like \u0019.

So you can use the following code to make it work:

//Marshal example
try (BadXmlCharacterFilterWriter writer = new BadXmlCharacterFilterWriter(file, encoding)) {
    JAXB.marshal(jaxbObject, writer);
}

//Unmarshal example
try (BadXmlCharactersFilterReader reader = new BadXmlCharactersFilterReader(file, encoding)) {
    return JAXB.unmarshal(reader, jaxbObjectClazz);
}
com.github.baev

QA Tools

Versions

Version
1.0