[jdom-interest] FilterList and adjacent Text nodes
Bradley S. Huffman
hip at a.cs.okstate.edu
Fri Dec 14 10:54:20 PST 2001
Just noticed that adjacent Text nodes won't be concatenated together when
added to a FilterList (addContent() works fine).
List l = element.getContent(); // really returns a FilterList
l.add( new Text( "test 1"));
l.add( new Text( "test 2"));
I looked at modifying FilterList and the filters, but FilterList only knows
about java.lang.Object and Filter doesn't know about siblings in the list
so I gave up on that idea.
I don't think it will be a problem in most cases, but if it comes up in the
future it might be something for the FAQ, plus the problem can be avoided
by using addContent().
Brad
More information about the jdom-interest
mailing list