Dom4j uses a ContentHandler in the background to create the elements, attributes, text nodes etc.
The ContentHandler.characters(...) method is used to create text nodes. The description of this method states: "The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information." So, when the mergeAdjacentText property is set to false, all the chunks are treated as separate text-nodes. Your XPath will only return the first text-node. The chunks can be different depending on the implementation of the SAX Parser or the format of the file, or other file IO related differences. When you set the mergeAdjacentText property to true, all these chunks are added together into one text-node and your XPath should return the full value. Regards, Edwin -- http://www.edankert.com/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user