FileDocCategorySizeDatePackage
HTMLTitleElementImpl.javaAPI DocApache Xerces 3.0.12775Fri Sep 14 20:33:52 BST 2007org.apache.html.dom

HTMLTitleElementImpl

public class HTMLTitleElementImpl extends HTMLElementImpl implements HTMLTitleElement
xerces.internal
version
$Revision: 447255 $ $Date: 2006-09-18 01:36:42 -0400 (Mon, 18 Sep 2006) $
author
Assaf Arkin
see
org.w3c.dom.html.HTMLTitleElement
see
org.apache.xerces.dom.ElementImpl

Fields Summary
private static final long
serialVersionUID
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;
        StringBuffer text = new StringBuffer();
        
        // Find the Text nodes contained within this element and return their
        // concatenated value. Required to go around comments, entities, etc.
        child = getFirstChild();
        while ( child != null )
        {
            if ( child instanceof Text ) {
                text.append(( (Text) child ).getData());
            }
            child = child.getNextSibling();
        }
        return text.toString();
    
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() );