dom4j - dom4j changes

##### dom4j

- Home
- FAQ
- Quick start
- Cookbook
- Comparison
- Goals
- Changes
- Download
- License
- Javadoc (1.6.1)
- Javadoc (1.5.2)
- Javadoc (1.4)

##### Project Documentation

- About dom4j
- Project Info
- Project Reports
  - Change Log
  - Changes
  - Checkstyle
  - Clover
  - Developer Activity
  - FAQs
  - File Activity
  - JavaDocs
  - JavaDoc Report
  - JavaDoc Warnings Report
  - Metrics
  - Unit Tests
  - Source Xref
  - Test Xref
  - Project License
- Development Process

##### Legend

- External Link
- Opens in a new window

## Release History

Version | Date | Description
--- | --- | ---
1.6.1 | 2005-05-16 |
1.6 | 2005-04-15 |
1.5.2 | 2004-11-15 |
1.5.1 | 2004-10-29 |
1.5 | 2004-09-03 |
1.5-rc1 | 2004-07-04 |
1.5-beta-2 | 2004-05-12 |
1.5-beta-1 | 2004-03-25 |

Get the RSS feed of the last changes

## Release 1.6.1 - 2005-05-16

Type | Changes | By
--- | --- | ---
| Updated the XPP2 implementation to version 2.1.10. Thanks to Wolfgang Baer . | maartenc
| Fixed a problem with `XMLWriter`that was causing too many new lines to be written to the resulting XML. Thanks to Thomas Fromm . | maartenc
| Include more information about the cause if an `XPathException`or `InvalidXPathException`is thrown. Thanks to Gili Tzabari . | maartenc

## Release 1.6 - 2005-04-15

Type | Changes | By
--- | --- | ---
| Added a methods to `SAXReader`allowing to specify the encoding used when reading XML sources. Thanks to Filip Jirsak . | maartenc
| Changed the `DocumentHelper.parseText(String)`method to make sure that the XML encoding is always set (if known) on the returned `Document`, even if the used SAXParser doesn't provide a way to retrieve that encoding. | maartenc
| Added a `setXMLEncoding(String)`method to the `Document`interface. | maartenc
| Removed a static `OutputFormat`field from `AbstractBranch`. This can cause problems if multiple threads are using the `asXML()`method simultaniously. Thanks to John Plaxton . | maartenc
| Fixed a whitespace problem with the pretty-print `OutputFormat`. Thanks to Brett Porter . | maartenc
| Fixed a bug in the `DefaultElement.setContent(List)`method that caused incorrectly resetting the parent of the nodes in the list. Thanks to Peter Schaefer . | maartenc
| Removed `persistence`package and sub-package. | wolfftw
| Modified `SAXEventRecorder`to accomodate sax events generated when writing a `DOMDocument`. | wolfftw
| Fixed a problem in `AbstractDocument.asXML()`when an encoding was specified on the `Document`. Thanks to Pieter Valcke . | maartenc
| The `DefaultNamespace.isReadOnly()`method now returns `false`. This fixes issues with cloning this `Node`. | maartenc
| Updated `DocumentFactory`to create the instance untill the first time it is needed. Thanks to Brian Topping . | maartenc
| Fixed a bug in `Stylesheet`when an xpath expressions was used to select the nodes. Thanks to Brett Porter . | maartenc
| Added a `SingletonStrategy`class for managing singletons. This allows to use different strategies for singletons, like: one instance per VM, one instance per thread, ... This change removed the usage of `ThreadLocal`s. | ddlucas

## Release 1.5.2 - 2004-11-15

Type | Changes | By
--- | --- | ---
| Removed the internal Aelfred2 parser due to incompatible license. | maartenc
| Added a `SAXEventRecorder`that can replay SAX events at a later time. This provides an alternative serialization approach. | wolfftw

## Release 1.5.1 - 2004-10-29

Type | Changes | By
--- | --- | ---
| Fixed problem where the namespace prefix was lost using `DOMDocument`. Thanks to Ara Vartanian . | maartenc
| Fixed bug in `Document.asXML()`which ignored the encoding of the document. Thanks to David Karlsen . | maartenc
| Updated `NamespaceCache`to use `WeakReference`s to allow `Namespace`objects to be garbage collected. | maartenc
| Updated `JAXBReader`to allow ElementHandlers to be notified when the specified path is encountered, without having to unmarshall XML content. Thanks to Wonne Keysers . | maartenc
| Fixed a bug in `XMLWriter`where a `NullPointerException`was thrown if trying to write a CData section containing `null`content. Thanks to Daniel Hopper . | maartenc
| Modified the internal Aelfred2 parser to no longer support the SAX2 Extensions 1.1 API. As a result, the SAX2 sources are no included with dom4j. | maartenc
| Added support for the XPP3 parser. Thanks to Pelle Braendgaard . | maartenc

## Release 1.5 - 2004-09-03

Type | Changes | By
--- | --- | ---
| Fixed bug in `XMLWriter.characters(...)`where the escapeText property of the writer was ignored. Thanks to Dion Gillard . | maartenc
| Fixed the `Stylesheet.removeRule(Rule)`method which didn't remove the `Rule`but added it again. Thanks to Peter Stibrany . | maartenc
| Fixed bug in `BackedList`causing new elements to always be added at the first position if the size of the list is 1. Thanks to Robert Koberg . | maartenc
| Upgraded the internal Aelfred2 parser to the latest version. | maartenc
| Added initial JAXB support. Thanks to Wonne Keysers . | maartenc
| Updated the STAX classes to provide document encoding. Thanks to Christian Niles . | maartenc
| Added `getXMLEncoding()`method to `org.dom4j.Document`which returns the encoding of the document. | maartenc

## Release 1.5-rc1 - 2004-07-04

Type | Changes | By
--- | --- | ---
| Removed the `DocumentHelper.parseText(String xml, String encoding)`method that was introduced in dom4j-1.5-beta2. | maartenc
| Added the GNU JAXP DOM implementation to the default list of implementations in `DOMWriter`. | maartenc
| Added method to `ElementStack`and `DispatchHandler`to check if a handler is registered for a given path. Thanks to Wonne Keysers . | maartenc
| `ElementStack`is now a public class. Thanks to Wonne Keysers . | maartenc
| `SAXContentHandler.endElement(...)`can now throw `SAXException`. Thanks to Wonne Keysers . | maartenc
| Added the namespace-prefix of attributes to the paths returned by `Attribute.getPath(Element context)`and `Attribute.getUniquePath(Element context)`. Thanks to Aaron Bell . | maartenc
| `Element.declaredNamespaces()`now only returns the namespaces that are declared on that element. `Element.additionalNamespaces()`now only returns namespaces that are declared on that element and is not the same as the namespace of that element. Thanks to Marc Pellmann . | maartenc
| Escape the values of internal DTD entity declarations when serializing to XML. Thanks to Marc Pellmann . | maartenc
| Fixed bug in `AbstractElement`causing `Node.getPath(Element context)`to return an absolute path, even if a the current element was the same as the context element. The relative path "." is now returned. Thanks to Rob Grzywinski . | maartenc
| Added method to `Element`to retrieve all `Namespaces`for a given URI. Thanks to Thomas Diesler . | maartenc
| Fixed bug in `DOMReader`causing namespace declarations to get lost in some situations. Thanks to Thomas Diesler . | maartenc
| Added a `booleanValueOf(Object node)`method to `XPath`. Thanks to Ben Scarlet . | maartenc
| Fixed bug in `BeanElement`which prevented proper execution of the bean samples. Thanks to Wonne Keysers . | maartenc
| `STAXEventWriter`now uses `XMLEventConsumer`instead of `XMLEventWriter`. Thanks to Christian Niles . | maartenc
| Fixed bug in `SAXReader`that caused problems parsing files in OSX. Thanks to Paul Libbrecht . | maartenc
| Fixed bug in `XMLWriter`that caused whitespace to be added between successive calls of the `characters(...)`method. This is used particularly frequent in Apache Jelly. Thanks to Paul Libbrecht . | maartenc
| Improved performance of `NamespaceCache`in multithreaded environments. Thanks to Brett Finnell . | maartenc

## Release 1.5-beta-2 - 2004-05-12

Type | Changes | By
--- | --- | ---
| Added flag to `OutputFormat`that supresses newline after XML declaration. | wolfftw
| Upgraded dependencies to their latest version on ibiblio. | maartenc
| Added method to `DocumentHelper`that allows user to specify encoding when parsing an xml `String`. Thanks to Todd Wolff . | maartenc
| Fixed a ClassCastException bug in `BeanElement`. | maartenc
| Fixed a bug in `SAXContentHandler`which caused a `NullPointerException`in some situations. | maartenc
| Fixed bug which prevented an element's namespace prefix from being registered for use in xpath expressions. Thanks to Todd Wolff . | maartenc
| Fixed bug in `XMLWriter`that caused duplication of the default namespace declaration. Thanks to Todd Wolff . | maartenc
| Added a bunch of patches to make the dom4j DOM classes more DOM compliant. Thanks to Curt Arnold . | maartenc
| Fixed bug in `DispatchHandler`which made the handler not reusable. Thanks to Ricardo Leon . | maartenc
| Fixed bug in `SAXContentHandler`that caused incorrect CDATA section parsing. Thanks to Todd Wolff . | maartenc
| Fixed bug in `SAXContentHandler`that caused incorrect entity handling. | maartenc
| Fixed bug in `XMLWriter`causing padding to be disabled, even if enabled in the specified outputformat. Thanks to Bo Gundersen . | maartenc
| Added initial support for STaX streams. Thanks to Christian Niles . | maartenc

## Release 1.5-beta-1 - 2004-03-25

Type | Changes | By
--- | --- | ---
| Fixed encoding bug in `Document.asXML()`and `DocumentHelper.parseText()`. | maartenc
| Fixed bug in `SAXReader`that caused problems resolving relative URIs when parsing `java.io.File`Objects. Thanks to Kohsuke Kawaguchi . | maartenc
| The iterators returned by the `Element.elementIterator(...)`methods now support `remove()`. | maartenc
| `DOMWriter`writes now DOM Level 2 attributes and elements. Thanks to Geert Dendoncker and Joury Gokel . | maartenc
| Use latest implementation of the Aelfred parser. | maartenc
| Fixed some problems with internal/external DTD declarations. Thanks to Bryan Thompson . | maartenc
| Upgraded to Jaxen 1.1 beta 2. | maartenc
| Ignore attribute order when comparing elements in `NodeComparator`. | maartenc
| Fixed bug in `XMLWriter`where namespace declarations were duplicated. | maartenc
| Fixed bug in parsing a `ProcessingInstruction`. Thanks to Vladimir Kralik . | maartenc
| Added support for `Stylesheet`modes. Thanks to Mark Diggory . | maartenc
| Don't escape " and ' characters in attribute values if it's not necessary. Thanks to Christian Niles . | maartenc
| Fixed some `DOMNodeHelper`issues. Thanks to Henner Kollmann . | maartenc
| Fixed some datatype issues. Thanks to Thomas Draier . | maartenc
| Fixed an bug where the EntityResolver was not set on the XMLReader. | maartenc
| Fixed multithreaded access on `DefaultElement`. | slehmann
| Fixed problem parsing XML Files. Thanks to Geoffrey Vlassaks . | maartenc
| Added xml:space attribute support based on XML Specification 1.0. | ddlucas
| Maven build of dom4j is now nearly complete. Maven is now used for the website generation. | maartenc
| Fixed some bugs in BackedList. Thanks to Alessandro Vernet . | maartenc