Fork me on GitHub

Release Notes

XMLBeam uses a modification of semantic versioning (major.minor.patch). The Major version number is incremented on a major API- or technology change. Dropping support for Java 6 will be such a change. The minor number is increased when a change is not API compatible, but the change is easy for you to cope with. The removal of the targetComponentType annotation was such a change. All you need was to remove it from your code. The patch level is increased on every backwards-compatible release even it is a new feature. The introduction of the update annotation is an example for this.

1.4.23 current release

  • Bugfix release: Under some circumstances, NPE occured while pretty printing.


  • Fixed compatibility with Xalan when using Java 8
  • Fixed unit tests to support Java 17


  • Reimplemented XML formatting for Java >=9. The old Transformer based implementation broke handling of elements containing whitespace only.
  • Enhanced determination of used Java version to support Android VMs.


  • Removing empty lines in created XML files with JDKs beyond 8.
  • New convenience mehtod getOrDefault for XBAutoValue


  • New support for LocalDate & LocalTime. Use it with formatting patterns if you like. * Support for Java 6 to Java 16. No warning when using default methods any more.


  • Bugfix release: Using the DataNotFoundException was not possible within OSGI.


  • Bugfix release: Some documents could be parsed one time only. On second attempt, an IOExcepion (stream closed) was thrown. This happend with Documents containing references to external entities, because a "NullEntitiyResolver" created an InputStream that was reused. Many thanks goes to Heiko Selber for submitting the bug and a unit test.


  • Bugfix release: Fixed reading CDATA nodes and text nodes from XPath function text().


  • Bugfix release: Disable entity expansion by default for security reasons. If you use XMLBeam with default XML-Engine to parse unsanitized xml, you need this fix.


  • Bugfix release: Fixed support for return type Optional (Java 8).


  • Bugfix release: Revert of API breaking change in 1.4.11


  • New AutoTypes allow now changing XML without projection interfaces.
  • New annotation @XBAuto unites setters & getters to one projection method.
  • Enhanced evaluation API allows in place changing of files.
  • New AutoMap type allows easy creation of documents from scratch.
  • Bug fixed: Default namespaces did not work when writing to the document root.


  • Bug fixed: Predicates in writing XPath expressions may contain paths now.
  • Bug fixed: Writing values to elements does not delete existing child elements any more.


  • Bug fixed: Prefixes for namespaces were not found when declared on non root elements.


  • Bug fixed: Check preventing nonpublic interfaces removed.
  • Enhancement: Extended existing exception feature to XBDelete & XBUpdate.
  • Bug fixed: Restructuring element lists in xml added empty lines in output document.

1.4.8 current release

  • Enhancement: Error message improved when writing to attributes of nonexisting root element.


  • Bug fixed: Projection interfaces could not use lambdas in default methods.
  • Bug fixed: XPath parameter names are not case sensitive any more.
  • Bug fixed: Fixed class loading issue when using xmlbeam.jar as OSGI bundle.
  • Enhancement: Now projection methods may declare Stream as return type.

1.4.6 current release

  • New feature: Now XPath can be directly evaluated during creation of projections. If you only need a projection to parts of the document, you do not need to create a projection interface for the whole document anymore.

1.4.5 current release

  • Bug fixed: XPath variables always resolved to the value of the first invocation.


  • New annotation @XBOverride fixes issues of default methods not able to override methods from Object.


  • XMLBeam jars are now OSGI bundles, directly usable in eclipse target platform.
  • Source code is automatically attached in Eclipse RCP plugin development.
  • Nothing changes for non OSGI/RCP developers. The jars are just contain additional meta data.


  • New feature: Specify a format pattern to choose the representation of dates and numbers. This works for reading and writing projection methods and can even be used in predicates. Format feature explained.
  • XPath variables now provide a way to have dynamic projections without the need to recompile the XPath expression again. This is much faster when methods are reused with different parameters.


  • New feature: Reading projection methods may now throw exceptions when values do not exist. Just declare your exception type in the method signature. If your exception constructor has parameters matching the projection methods, all method parameters are passed to the exception. This is useful if you call projection methods from multiple places and returning Optional would replicate your error handling.
  • Performance improvements. Reusing more objects in consecutive projection method calls.


  • Changed the default value of String conversions to null. Now you get a null value on selecting non existing values. If you need the previous behavior, please instantiate the projector with the flag ABSENT_IS_EMPTY.
  • Replaced the old writing XPath logic with a new powerful parser with more features and better error diagnostics.
  • Removal of included ASM library. Default methods are handled via Reflection and MethodHandles now. Faster and 100kb smaller. ASM may come back to the project to replace the dynamic proxy. More benchmarking needed on this.


  • Changed default value of Boolean, Float, Double, Interger, Long and Character to null. Now you get a null value on selecting non existing values of these types. Unfortunately this still does not work for String.
  • Support for java.util.Optional as return type.
  • Additional projection method checks. You may not use raw List or Optional types. You may not use Optional as a parameter type.
  • API-compatible with 1.2.x, but still a minor version increase because of library behavior change.


  • New "update" mode for writing to the DOM tree. If no structure change is needed, use the annotation @XBUpdate providing full XPath capabilities.
  • Now int or Integer is allowed as return code for writing projection methods. Setters, deleters and updaters are going to return the number of changes made to the DOM tree.
  • URL protocol 'resource://' now has a new abbreviation 'res://' to be compatible with org.apache.commons.vfs.
  • Minor bugfix with DOM-API integration. Just use org.w3c.dom.Node as return type or parameter anywhere.
  • API-compatible with 1.2.x


  • Moving the parameter resolution for dynamic projections from java.text.MessageFormat to a more XPath friendly implementation. This resolves the issue having to double the single quotes ('). Now you can (and have) to write them unquoted.
  • Java-API-compatible, but change in XPath syntax: Please replace all '' with ' in your XPath expressions.

1.1.3 current release

  • Use Java method parameter names in dynamic projections with Java 8. (see here)
  • API-compatible with 1.1.x


  • Automatic type conversion (see here).
  • API-compatible with 1.1.x


  • Support for Java 8 default methods
  • Validation of projection interface during creation
  • Improved XPath error reporting
  • API-compatible with 1.1.0

1.1.0 current release

  • API change in @XBRead annotation. You have to remove all parameters for targetComponentType, this is now determined by reflection.
  • The final class NotExternalized was replaced by a non final ExternalizerAdapter.

1.0.0 initial release