FileDocCategorySizeDatePackage
HTMLTitleElementImpl.javaAPI DocJava SE 5 API4480Fri Aug 26 14:55:28 BST 2005com.sun.org.apache.html.internal.dom

HTMLTitleElementImpl

public class HTMLTitleElementImpl extends HTMLElementImpl implements HTMLTitleElement
version
$Revision: 1.6 $ $Date: 2003/05/08 20:13:09 $
author
Assaf Arkin
see
org.w3c.dom.html.HTMLTitleElement
see
com.sun.org.apache.xerces.internal.dom.ElementImpl

Fields Summary
Constructors Summary
public HTMLTitleElementImpl(HTMLDocumentImpl owner, String name)
Constructor requires owner document.

param
owner The owner HTML document

        super( owner, name );
    
Methods Summary
public java.lang.StringgetText()

        Node    child;
        String    text;
        
        // Find the Text nodes contained within this element and return their
        // concatenated value. Required to go around comments, entities, etc.
        child = getFirstChild();
        text = "";
        while ( child != null )
        {
            if ( child instanceof Text )
                text = text + ( (Text) child ).getData();
            child = child.getNextSibling();
        }
        return text;
    
public voidsetText(java.lang.String text)

        Node    child;
        Node    next;
        
        // Delete all the nodes and replace them with a single Text node.
        // This is the only approach that can handle comments and other nodes.
        child = getFirstChild();
        while ( child != null )
        {
            next = child.getNextSibling();
            removeChild( child );
            child = next;
        }
        insertBefore( getOwnerDocument().createTextNode( text ), getFirstChild() );