[jdom-interest] getChild() convenience methods

Bill Woodward wpwood at saifa.net
Fri May 30 07:26:51 PDT 2003


Bradley S. Huffman said:
>
> They stay the same, since they return a string of text representing the
> value of the child Text nodes concatenated together it doesn't make sense
> to have Element in the name.
>

Huh, I didn't know that.  So, if you have a setup like this:

<document-list>
   <value>test1.1</value>
   <value>test1.2</value>
   <value>test1.3</value>
   <value>test1.4</value>
</document-list>

And you have an Element 'e' that represents the <document-list> element,
then e.getChildText("value") will return 'test1.1test1.2test1.3test1.4'? 
That's not obvious from the getChildText javadoc.  Should the javadoc be
updated?

- Bill

      /------------------------------------\
     /   Bill Woodward (wpwood at saifa.net)   \
     \        http://www.saifa.net          /
      \------------------------------------/



More information about the jdom-interest mailing list