How to get element's raw value without trimming it using dom4j?

78 views Asked by At

Imagine that I have the following XML element with multi-lines value \nline2,

<address>
line2</address>

I'm using dom4j Element's getText(), but it trimmed the empty line (the \n) and returned line2.

Is there a way to retrieve the raw value \nline2 without trimming?

1

There are 1 answers

0
forty-two On BEST ANSWER

I doubt that. You probably used getTextTrim().