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

HTMLScriptElementImpl

public class HTMLScriptElementImpl extends HTMLElementImpl implements HTMLScriptElement
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.HTMLScriptElement
see
org.apache.xerces.dom.ElementImpl

Fields Summary
private static final long
serialVersionUID
Constructors Summary
public HTMLScriptElementImpl(HTMLDocumentImpl owner, String name)
Constructor requires owner document.

param
owner The owner HTML document

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

        return getAttribute( "charset" );
    
public booleangetDefer()

        return getBinary( "defer" );
    
public java.lang.StringgetEvent()

        return getAttribute( "event" );
    
public java.lang.StringgetHtmlFor()

        return getAttribute( "for" );
    
public java.lang.StringgetSrc()

        return getAttribute( "src" );
    
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 java.lang.StringgetType()

        return getAttribute( "type" );
    
public voidsetCharset(java.lang.String charset)

        setAttribute( "charset", charset );
    
public voidsetDefer(boolean defer)

        setAttribute( "defer", defer );
    
public voidsetEvent(java.lang.String event)

        setAttribute( "event", event );
    
public voidsetHtmlFor(java.lang.String htmlFor)

        setAttribute( "for", htmlFor );
    
public voidsetSrc(java.lang.String src)

        setAttribute( "src", src );
    
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() );
    
public voidsetType(java.lang.String type)

        setAttribute( "type", type );