> <h1>The Title</h1>
> <p>Paragraph 1.</p>
> <p>Paragraph 2.</p>
> 
> You get:
> 
> The TitleParagraph 1.Paragraph 2.

I think you might be stripping whitespace nodes? 
If you would turn this off you should get:

The Title
Paragraph 1.
Paragraph 2.

> I wonder if this method would be more useful in general if spaces 
> (or some other separator) were inserted between text nodes. 
> Although, then it would not be an exact representation of the text. 
> But I can't see the use of it any other way. What do you think? 
> How are people using Element.getStringValue()?

I think this is there to give you exactly the same functionality as 
with the xsl:value-of element in xslt. (in both cases, you are 
depending on the whitespace defined in the XML document)

There is also the String Node.valueOf( String xpath) method you 
could use instead (should give a similar result).

Regards,
Edwin


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to