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();
}

