Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Element.getValue()

xom-interest AT

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT>
  • To: Dick H <dick AT>, xom-interest AT
  • Cc:
  • Subject: Re: [XOM-interest] Element.getValue()
  • Date: Thu, 22 May 2003 12:42:54 -0400

At 11:10 AM -0500 5/22/03, Dick H wrote:
I am using 1.0d12, my first experience with XOM and am overjoyed.

Found one nuisance with Element.getValue() when applied to an Element that has both Text and Element children. I want just the concatonation of the Text nodes in the current Element. getValue() includes even the non-Text child nodes. Don't want that.

Can you give me a use-case of why you'd want just the Text nodes, irrespective of all the child elements? This seems to me quite unusual and perhaps dangerous.

(note: getValue doesn't include all the child nodes. It skips comments and processing instructions)

Elliotte Rusty Harold
elharo AT
Processing XML with Java (Addison-Wesley, 2002)

Archive powered by MHonArc 2.6.24.

Top of Page