protected static Text ensureText(String message, Node node) throws MalformedElementException {
    """
	Ensures that the given node is a text node, returning it as a
	<code>Text</code> node if it is.
	
	@param message the message for the exception that is thrown if the
	node is not a <code>Text</code> node
	@param node    the node, or <code>null</code>
	@returns       the node as a <code>Text</code> node
	@exception     MalformedElementException if the node is
	<code>null</code> or not a text node
    """
        if (node == null || node.getNodeType() != Node.TEXT_NODE)
            throw new MalformedElementException(message);
        return (Text) node;
    }
protected static Text ensureText(String message, Node node) throws MalformedElementException {
        if (node == null || node.getNodeType() != Node.TEXT_NODE)
            throw new MalformedElementException(message);
        return (Text) node;
    }
protected static Text ensureText ( String message , Node node ) throws MalformedElementException { if ( node == null || node . getNodeType ( ) != Node . TEXT_NODE ) throw new MalformedElementException ( message ) ; return ( Text ) node ; }
Ensures that the given node is a text node, returning it as a
<code>Text</code> node if it is.

@param message the message for the exception that is thrown if the
node is not a <code>Text</code> node
@param node    the node, or <code>null</code>
@returns       the node as a <code>Text</code> node
@exception     MalformedElementException if the node is
<code>null</code> or not a text node
Ensures that the given node is a text node returning it as a <code > Text< / code > node if it is .