Java Doc for HTMLDocument.java in  » 6.0-JDK-Core » w3c » org » w3c » dom » html » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » w3c » org.w3c.dom.html 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.w3c.dom.html.HTMLDocument

HTMLDocument
public interface HTMLDocument extends Document(Code)
An HTMLDocument is the root of the HTML hierarchy and holds the entire content. Besides providing access to the hierarchy, it also provides some convenience methods for accessing certain sets of information from the document.

The following properties have been deprecated in favor of the corresponding ones for the BODY element: alinkColor background bgColor fgColor linkColor vlinkColor In DOM Level 2, the method getElementById is inherited from the Document interface where it was moved.

See also the Document Object Model (DOM) Level 2 Specification.





Method Summary
public  voidclose()
     Closes a document stream opened by open() and forces rendering.
public  HTMLCollectiongetAnchors()
     A collection of all the anchor (A ) elements in a document with a value for the name attribute.
public  HTMLCollectiongetApplets()
     A collection of all the OBJECT elements that include applets and APPLET ( deprecated ) elements in a document.
public  HTMLElementgetBody()
     The element that contains the content for the document.
public  StringgetCookie()
     The cookies associated with this document.
public  StringgetDomain()
     The domain name of the server that served the document, or null if the server cannot be identified by a domain name.
public  NodeListgetElementsByName(String elementName)
     Returns the (possibly empty) collection of elements whose name value is given by elementName .
Parameters:
  elementName - The name attribute value for an element.
public  HTMLCollectiongetForms()
     A collection of all the forms of a document.
public  HTMLCollectiongetImages()
     A collection of all the IMG elements in a document.
public  HTMLCollectiongetLinks()
     A collection of all AREA elements and anchor ( A ) elements in a document with a value for the href attribute.
public  StringgetReferrer()
     Returns the URI of the page that linked to this page.
public  StringgetTitle()
     The title of a document as specified by the TITLE element in the head of the document.
public  StringgetURL()
     The complete URI of the document.
public  voidopen()
     Note.
public  voidsetBody(HTMLElement body)
    
public  voidsetCookie(String cookie)
    
public  voidsetTitle(String title)
    
public  voidwrite(String text)
     Write a string of text to a document stream opened by open() .
public  voidwriteln(String text)
     Write a string of text followed by a newline character to a document stream opened by open() .



Method Detail
close
public void close()(Code)
Closes a document stream opened by open() and forces rendering.



getAnchors
public HTMLCollection getAnchors()(Code)
A collection of all the anchor (A ) elements in a document with a value for the name attribute. Note. For reasons of backwards compatibility, the returned set of anchors only contains those anchors created with the name attribute, not those created with the id attribute.



getApplets
public HTMLCollection getApplets()(Code)
A collection of all the OBJECT elements that include applets and APPLET ( deprecated ) elements in a document.



getBody
public HTMLElement getBody()(Code)
The element that contains the content for the document. In documents with BODY contents, returns the BODY element. In frameset documents, this returns the outermost FRAMESET element.



getCookie
public String getCookie()(Code)
The cookies associated with this document. If there are none, the value is an empty string. Otherwise, the value is a string: a semicolon-delimited list of "name, value" pairs for all the cookies associated with the page. For example, name=value;expires=date .



getDomain
public String getDomain()(Code)
The domain name of the server that served the document, or null if the server cannot be identified by a domain name.



getElementsByName
public NodeList getElementsByName(String elementName)(Code)
Returns the (possibly empty) collection of elements whose name value is given by elementName .
Parameters:
  elementName - The name attribute value for an element. The matching elements.



getForms
public HTMLCollection getForms()(Code)
A collection of all the forms of a document.



getImages
public HTMLCollection getImages()(Code)
A collection of all the IMG elements in a document. The behavior is limited to IMG elements for backwards compatibility.



getLinks
public HTMLCollection getLinks()(Code)
A collection of all AREA elements and anchor ( A ) elements in a document with a value for the href attribute.



getReferrer
public String getReferrer()(Code)
Returns the URI of the page that linked to this page. The value is an empty string if the user navigated to the page directly (not through a link, but, for example, via a bookmark).



getTitle
public String getTitle()(Code)
The title of a document as specified by the TITLE element in the head of the document.



getURL
public String getURL()(Code)
The complete URI of the document.



open
public void open()(Code)
Note. This method and the ones following allow a user to add to or replace the structure model of a document using strings of unparsed HTML. At the time of writing alternate methods for providing similar functionality for both HTML and XML documents were being considered. The following methods may be deprecated at some point in the future in favor of a more general-purpose mechanism.
Open a document stream for writing. If a document exists in the target, this method clears it.



setBody
public void setBody(HTMLElement body)(Code)



setCookie
public void setCookie(String cookie)(Code)



setTitle
public void setTitle(String title)(Code)



write
public void write(String text)(Code)
Write a string of text to a document stream opened by open() . The text is parsed into the document's structure model.
Parameters:
  text - The string to be parsed into some structure in the document structure model.



writeln
public void writeln(String text)(Code)
Write a string of text followed by a newline character to a document stream opened by open() . The text is parsed into the document's structure model.
Parameters:
  text - The string to be parsed into some structure in the document structure model.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.