setting the text content of an Entity

Hi all

In some java code I'm writing, if I set the text content of an element, it wipes out any sub-elements that were there before. I just want to confirm that this is correct behavior and that I am doing this correctly. If an element has text, it can't have other children, correct?

code from my TreeModel is below

publicvoid valueForPathChanged(TreePath arg0, Object arg1){

Object o = arg0.getLastPathComponent();

if (oinstanceof Attr){

Attr attr = (Attr) o;

attr.setValue(arg1.toString());

mTree.updateUI();

}

if (oinstanceof Element){

Element el = (Element) o;

//el.setNodeValue(arg1.toString());

el.setTextContent(arg1.toString());

mTree.updateUI();

}

[1121 byte] By [tjacobs01a] at [2007-11-27 5:48:04]
# 1
I was wrong you can have text and data I had just screwed up my tree model :)
tjacobs01a at 2007-7-12 15:33:09 > top of Java-index,Java Essentials,Java Programming...