Title: Message
Hi Doug
 
Firstly if you want the XPath string value of a node you can just call the getStringValue() method.
 
node.getStringValue();
 
Secondly the valueOf() method always returns the XPath string value of the XPath expression you give so that
 
node.valueOf( "'." )
 
should pretty much equate to the same thing.
 
Though neither of these things explain your problem. Is there any way you can create a fragment of XML and demonstrate the problem with a snippet of code? Maybe you are actually adding null Strings to the XML document?
 
Element element = ...;
element.addText ( null );
 
If this is the case then maybe we should explicitly check for null strings and quitely ignore them...

James
----- Original Message -----
Sent: Thursday, October 25, 2001 12:41 PM
Subject: [dom4j-dev] valueOf("text()") not getting full value?

Hi all,
 
    Has anyone had any problems with the [_currentNode.valueOf("text()")] not getting the entire value (or if it is, the value is not being stored in the Xml Dom tree properly?
 
    I have a really really really large Xml Dom tree and looping through a bunch of nodes to extract some values (results from a database table: 60 columns by 4000 rows).  Some of my datavalues are coming out at "nul" or "n" as opposed to "null".  I checked  the xml string before building the dom and there are no "nul" or "n" values (The xml string correctly shows the "null").  However, when I use the valueOf("text()") method, I get only part of my value.
 
    Any ideas would be greatly appreciated.
 
Doug Hoppes
Charles River Development
781-238-0099 x269
 

Reply via email to