Is there a method to strip whitespace within an element's text while
reading in?
For example, I'd like to strip out the whitespace before and after
"NoSensor" in the snippet below. I'm doing this for XPath reasons, i.e.,
I'd like to have //Sensor[name="NoSensor"] instead of
//Sensor[normalizespace(name)="NoSensor"] or //Sensor[name=" NoSensor
"].
    <Sensor>
        <name> NoSensor </name>
        <range> 0.0 </range>
        <frameTime> 10000.0 </frameTime>
        <timeout> 2.0 </timeout>
    </Sensor>

I tried setStripWhitespaceText for the SAXReader, but this doesn't do it
(I noticed in the archives there's a email concerning this, but looks
like strips the whitespace outside of the elements or between elements,
but not within.

thanx
steve




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to