posted 17 years ago
The first thing to understand here is that an Element node can not have any text, so calling the setText() method on it is meaningless.
However an Element node can have children. If you want the element to have a child node with text, then create a Text node, put text in it, and add it as a child of the Element.