2.0.1 - 2026-04-16
- Updated to object-copier 1.2.0.
2.0.0 - 2026-03-31
- Added a comprehensive User Guide covering the core concepts of xml-objects and providing examples to help you get started.
- Added a dependency on the new standalone object-copier library, which supersedes the built-in copy infrastructure that was previously part of xml-objects.
- Breaking: The
CopyBuilderclass and the entireutil.copypackage have been removed. The object-copier library is the designated replacement, providing a significantly more powerful and flexible copy framework.- The central entry point is now the
Copierclass (packageorg.xmlobjects.copy), which is created viaCopierBuilderusingCopierBuilder.newCopier()for a default instance orCopierBuilder.newInstance()for a customized one. Copyable,CopyContext, andTypeClonerhave been moved to theorg.xmlobjects.copypackage of the object-copier library. The semantics ofCopyablehave changed:shallowCopy/deepCopyare replaced byshallowCopyTo/deepCopyTo(accepting aCopyContext) andnewInstance.failOnErrorhas been removed. Errors are always propagated asCopyException(unchecked).- See the object-copier documentation for details on the new
capabilities. In particular, the
CopySessionfeature now enables maintaining object identity across multiple copy operations.
- The central entry point is now the
1.3.0 - 2025-12-29
- Made
CopyBuilderthread-safe for concurrent use. - Removed
SerializablefromCopyable. Implementations must declare serialization explicitly now. - Removed
withCloneandwithSelfCopyfromCopyBuilder. - Updated
Copyable.shallowCopyandCopyable.deepCopyto accept aCopyContext, which now provides the formerwithCloneandwithSelfCopyfunctionality. - Changed
CopyBuilder.failOnErrorto be true by default.
CopyBuildernow invokesCopyable.shallowCopyfor the initial object being copied, when provided.
1.2.0 - 2025-11-20
- Introduced
TextContent.ABSENTsentinel to represent missing content, replacing the previousTextContent.EMPTY. New API methods:TextContent absent()— returns an absent instance (ignored during serialization).boolean isAbsent()—trueif content is absent.boolean isPresent()—trueif content exists.boolean isEmpty()—trueif content exists but is an empty string.
- Added
getAsXOrElseandgetAsXOrElseGetmethods toTextContentto provide a default value when parsing into the expected type fails:OrElsetakes a direct value,OrElseGettakes aSupplierfor lazy evaluation.
- Fixed
XMLReader.getTextContent()to returnTextContent.ABSENTif the reader is not at a start element. - Fixed
TextContent.collapse()to no longer produce strings starting with'\0'. - Corrected typo in
getAsCalendarandgetAsCalendarListmethods ofTextContent.
1.1.6 - 2025-09-27
- Updated xsom to 4.0.6.
1.1.5 - 2025-03-02
- Removed unnecessary use of
WeakReferenceinXMLReader.
1.1.4 - 2025-01-19
- Updated classindex to 3.13.1.
- Updated Gradle to 8.12.
1.1.2 - 2024-12-01
- Added method
getObjectTypestoXMLObjectsclass to get supported object types with their XML element name mappings.
1.1.1 - 2024-07-05
- Avoid unnecessary conversion to
OffsetDateTimeinTextContent.
1.1.0 - 2024-01-29
- Breaking: Java 17 is now the minimum required version for using xml-objects.
- Unknown XML content is mapped to DOM elements using the default DOM transformer to avoid issues with external XML libraries.
1.0.4 - 2023-11-03
- Added
getEncodingmethod toXMLReader, which returns the input encoding if known or null if unknown. - Added methods to build default factories to
SecureXMLProcessorsandXMLReaderFactory. - Added
useAsFragmentmethod toSAXBufferto enable writing of XML fragments.
- Fixed
CopyBuilderto avoid deep-copying those parents ofChildobjects that are outside the hierarchy of the object to be copied.
1.0.3 - 2023-04-04
- Added support for providing an XML factory when creating an instance of
XMLReaderFactoryandSchemaHandler. SecureXMLProcessorsnow allows for obtaining an XML factory from a class name and a class loader. This gives more control to the application as it can specify which implementation should be loaded.
- Updated xsom to 4.0.2.
1.0.2 - 2023-02-06
- Updated xsom to 4.0.1.
1.0.1 - 2022-09-08
SAXWriternow uses the newline character (\n) for line breaks instead of the system-specific line separator.
- Fixed
DepthXMLStreamReaderto read schema documents specified by a Windows path inxsi:schemaLocation.
1.0.0 - 2022-08-20
This is the initial release of xml-objects.