[jdom-interest] retrieving the children of an element as text
Paul Libbrecht
paul at activemath.org
Thu Sep 14 00:27:59 PDT 2006
J. McConnell wrote:
> On 9/13/06, Jason Hunter <jhunter at servlets.com> wrote:
>> J. McConnell wrote:
>> > On 9/13/06, Jason Hunter <jhunter at servlets.com> wrote:
>> >> I'd recommend xmlOutputter.outputString(mainelement.getContent()).
>> I think it will, since getContent() includes the elements as well as the
>> whitespace text nodes, and by default XMLOutputter doesn't alter source
>> whitespace.
> Huh, good to know. Sorry for the confusion and thanks for the
> explanation!
Can I ask whether DOM is better than SAX in this respect ?
Whether there's anything yet different better than that ?
(e.g. that would preserve whitespace inside tags)
thanks
paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
Url : http://www.jdom.org/pipermail/jdom-interest/attachments/20060914/3a7752b3/smime.bin
More information about the jdom-interest
mailing list