Can anyone explain me why the following code
import
groovy.xml.DOMBuilderimport
groovy.xml.dom.DOMCategorydef doc =
groovy.xml.DOMBuilder.parse(new StringReader("<body><x> x
</x></body>"));
use(
groovy.xml.dom.DOMCategory)
{
println ">" + doc.x.text() + "<"
println ">" + doc.x[0].children()[0].text() + "<"
}
produces
> x <
>x<
Eg, in the first case the whitespace is kept, in the second it is
trimmed. Is this a bug, expected behavior (in this case where is it
documented)? What does the XML specification says in this matter?
My personal guess is that the objects used are not the same. But what
are exactly those objects then?
Jean-Noel
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email