* @return the node as a text element.
* @exception XPCOMException if the node is not a text node.
* @see #asPlainText(nsIDOMNode)
*/
public static nsIDOMText asTextNode(nsIDOMNode node) {
nsIDOMText text = (nsIDOMText) node.queryInterface(nsIDOMText.NS_IDOMTEXT_IID);
return text;
}