Package org.w3c.dom.html

Examples of org.w3c.dom.html.HTMLTitleElement


        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void setTitle(String title)
    {
        HTMLTitleElement titleElem = getTitleElement();
        if (titleElem == null) throw new DOMException(DOMException.NOT_FOUND_ERR,"<title> element is missing");
        titleElem.setText(title);
    }
View Full Code Here


  public String getTitle() {
    if (this.isHTMLDocument) {
      NodeList nl = this.getElementsByTagName("title");

      if (nl.getLength() > 0) {
        HTMLTitleElement title = (HTMLTitleElement) nl.item(0);

        return title.getText();
      } // end if

      return "";
    } // end if
View Full Code Here

   *            DOCUMENT ME!
   */
  public void setTitle(final String title) {
    if (this.isHTMLDocument) {
      NodeList nl = this.getElementsByTagName("title");
      HTMLTitleElement nTitle = null;

      if (nl.getLength() > 0) {
        nTitle = (HTMLTitleElement) nl.item(0);
        nTitle.setTitle(title);
      } // end if
      else {
        nTitle = new CHTMLTitleElement(this);
        nTitle.setTitle(title);
        nl = this.getElementsByTagName("head");

        HTMLHeadElement head = null;

        if (nl.getLength() > 0) {
View Full Code Here

TOP

Related Classes of org.w3c.dom.html.HTMLTitleElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.