.TH "DOM::HTMLDocument" 3 "28 Jan 2004" "khtml Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
DOM::HTMLDocument \- An \fC \fBHTMLDocument\fP \fP is the root of the HTML hierarchy and holds the entire content.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <html_document.h>\fP
.PP
Inherits \fBDOM::Document\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBHTMLDocument\fP (\fBKHTMLView\fP *parent)"
.br
.RI "\fIThe parent is the widget the document should render itself in. \fP"
.ti -1c
.RI "\fBHTMLDocument\fP (const  \fBHTMLDocument\fP &other)"
.br
.ti -1c
.RI "\fBHTMLDocument\fP (const  \fBNode\fP &other)"
.br
.ti -1c
.RI "\fBHTMLDocument\fP & \fBoperator=\fP (const  \fBHTMLDocument\fP &other)"
.br
.ti -1c
.RI "\fBHTMLDocument\fP & \fBoperator=\fP (const  \fBNode\fP &other)"
.br
.ti -1c
.RI "\fBDOMString\fP \fBtitle\fP () const "
.br
.RI "\fIThe title of a document as specified by the \fC TITLE \fP element in the head of the document. \fP"
.ti -1c
.RI "void \fBsetTitle\fP (const  \fBDOMString\fP &)"
.br
.RI "\fIsee \fBtitle\fP \fP"
.ti -1c
.RI "\fBDOMString\fP \fBreferrer\fP () const "
.br
.RI "\fIReturns the URI of the page that linked to this page. \fP"
.ti -1c
.RI "\fBDOMString\fP \fBdomain\fP () const "
.br
.RI "\fIThe domain name of the server that served the document, or a null string if the server cannot be identified by a domain name. \fP"
.ti -1c
.RI "\fBDOMString\fP \fBURL\fP () const "
.br
.RI "\fIThe absolute URI of the document. \fP"
.ti -1c
.RI "\fBHTMLElement\fP \fBbody\fP () const "
.br
.RI "\fIThe element that contains the content for the document. \fP"
.ti -1c
.RI "void \fBsetBody\fP (const  \fBHTMLElement\fP &)"
.br
.RI "\fIsee \fBbody\fP \fP"
.ti -1c
.RI "\fBHTMLCollection\fP \fBimages\fP () const "
.br
.RI "\fIA collection of all the \fC IMG \fP elements in a document. \fP"
.ti -1c
.RI "\fBHTMLCollection\fP \fBapplets\fP () const "
.br
.RI "\fIA collection of all the \fC OBJECT \fP elements that include applets and \fC APPLET \fP ( deprecated ) elements in a document. \fP"
.ti -1c
.RI "\fBHTMLCollection\fP \fBlinks\fP () const "
.br
.RI "\fIA collection of all \fC AREA \fP elements and anchor ( \fC A \fP ) elements in a document with a value for the \fC href \fP attribute. \fP"
.ti -1c
.RI "\fBHTMLCollection\fP \fBforms\fP () const "
.br
.RI "\fIA collection of all the forms of a document. \fP"
.ti -1c
.RI "\fBHTMLCollection\fP \fBanchors\fP () const "
.br
.RI "\fIA collection of all the anchor ( \fC A \fP ) elements in a document with a value for the \fC name \fP attribute. \fP"
.ti -1c
.RI "\fBDOMString\fP \fBcookie\fP () const "
.br
.RI "\fIThe cookies associated with this document. \fP"
.ti -1c
.RI "void \fBsetCookie\fP (const  \fBDOMString\fP &)"
.br
.RI "\fIsee \fBcookie\fP \fP"
.ti -1c
.RI "void \fBopen\fP ()"
.br
.RI "\fINote. \fP"
.ti -1c
.RI "void \fBclose\fP ()"
.br
.RI "\fICloses a document stream opened by \fC \fBopen()\fP \fP and forces rendering. \fP"
.ti -1c
.RI "void \fBwrite\fP (const  \fBDOMString\fP &text)"
.br
.RI "\fIWrite a string of text to a document stream opened by \fC \fBopen()\fP \fP . \fP"
.ti -1c
.RI "void \fBwriteln\fP (const  \fBDOMString\fP &text)"
.br
.RI "\fIWrite a string of text followed by a newline character to a document stream opened by \fC \fBopen()\fP \fP . \fP"
.ti -1c
.RI "\fBNodeList\fP \fBgetElementsByName\fP (const  \fBDOMString\fP &elementName)"
.br
.RI "\fIReturns the (possibly empty) collection of elements whose \fC name \fP value is given by \fC elementName \fP . \fP"
.ti -1c
.RI "\fBDOMString\fP \fBcompleteURL\fP (const  \fBDOMString\fP &url) const "
.br
.RI "\fInot part of the \fBDOM\fP \fP"
.ti -1c
.RI "\fBDOMString\fP \fBlastModified\fP () const "
.br
.RI "\fINot part of the \fBDOM\fP. \fP"
.ti -1c
.RI "\fBHTMLCollection\fP \fBall\fP () const "
.br
.RI "\fINot part of the \fBDOM\fP. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBHTMLDocument\fP (HTMLDocumentImpl *impl)"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fB::KHTMLView\fP"
.br
.ti -1c
.RI "class \fB::KHTMLPart\fP"
.br
.ti -1c
.RI "class \fBDOMImplementation\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
An \fC \fBHTMLDocument\fP \fP is the root of the HTML hierarchy and holds the entire content. 

Beside providing access to the hierarchy, it also provides some convenience methods for accessing certain sets of information from the document.
.PP
The following properties have been deprecated in favor of the corresponding ones for the BODY element:
.PP
alinkColor
.PP
background
.PP
bgColor
.PP
fgColor
.PP
linkColor
.PP
vlinkColor
.PP
Definition at line 73 of file html_document.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "HTMLDocument::HTMLDocument (\fBKHTMLView\fP * parent)"
.PP
The parent is the widget the document should render itself in. Rendering information (like sizes, etc...) is only created if parent != 0 Definition at line 42 of file html_document.cpp.
.SH "Member Function Documentation"
.PP 
.SS "\fBDOMString\fP HTMLDocument::title () const"
.PP
The title of a document as specified by the \fC TITLE \fP element in the head of the document. Definition at line 84 of file html_document.cpp.
.SS "void HTMLDocument::setTitle (const \fBDOMString\fP &)"
.PP
see \fBtitle\fP Definition at line 90 of file html_document.cpp.
.SS "\fBDOMString\fP HTMLDocument::referrer () const"
.PP
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). Definition at line 96 of file html_document.cpp.
.SS "\fBDOMString\fP HTMLDocument::domain () const"
.PP
The domain name of the server that served the document, or a null string if the server cannot be identified by a domain name. Definition at line 109 of file html_document.cpp.
.SS "\fBDOMString\fP HTMLDocument::URL () const"
.PP
The absolute URI of the document. Definition at line 121 of file html_document.cpp.
.SS "\fBHTMLElement\fP HTMLDocument::body () const"
.PP
The element that contains the content for the document. In documents with \fC BODY \fP contents, returns the \fC BODY \fP element, and in frameset documents, this returns the outermost \fC FRAMESET \fP element. Definition at line 127 of file html_document.cpp.
.SS "void HTMLDocument::setBody (const \fBHTMLElement\fP &)"
.PP
see \fBbody\fP Definition at line 133 of file html_document.cpp.
.PP
References DOM::Node::handle().
.SS "\fBHTMLCollection\fP HTMLDocument::images () const"
.PP
A collection of all the \fC IMG \fP elements in a document. The behavior is limited to \fC IMG \fP elements for backwards compatibility. Definition at line 140 of file html_document.cpp.
.SS "\fBHTMLCollection\fP HTMLDocument::applets () const"
.PP
A collection of all the \fC OBJECT \fP elements that include applets and \fC APPLET \fP ( deprecated ) elements in a document. Definition at line 146 of file html_document.cpp.
.SS "\fBHTMLCollection\fP HTMLDocument::links () const"
.PP
A collection of all \fC AREA \fP elements and anchor ( \fC A \fP ) elements in a document with a value for the \fC href \fP attribute. Definition at line 152 of file html_document.cpp.
.SS "\fBHTMLCollection\fP HTMLDocument::forms () const"
.PP
A collection of all the forms of a document. Definition at line 158 of file html_document.cpp.
.SS "\fBHTMLCollection\fP HTMLDocument::anchors () const"
.PP
A collection of all the anchor ( \fC A \fP ) elements in a document with a value for the \fC name \fP attribute. Note. For reasons of backwards compatibility, the returned set of anchors only contains those anchors created with the \fC name \fP attribute, not those created with the \fC id \fP attribute. Definition at line 164 of file html_document.cpp.
.SS "\fBDOMString\fP HTMLDocument::cookie () const"
.PP
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, \fC name=value;expires=date \fP . Definition at line 176 of file html_document.cpp.
.SS "void HTMLDocument::setCookie (const \fBDOMString\fP &)"
.PP
see \fBcookie\fP Definition at line 182 of file html_document.cpp.
.SS "void HTMLDocument::open ()"
.PP
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.
.PP
Open a document stream for writing. If a document exists in the target, this method clears it.
.PP
\fBReturns:\fP
.RS 4
.RE
.PP
Definition at line 189 of file html_document.cpp.
.SS "void HTMLDocument::close ()"
.PP
Closes a document stream opened by \fC \fBopen()\fP \fP and forces rendering. \fBReturns:\fP
.RS 4
.RE
.PP
Definition at line 195 of file html_document.cpp.
.SS "void HTMLDocument::write (const \fBDOMString\fP & text)"
.PP
Write a string of text to a document stream opened by \fC \fBopen()\fP \fP . The text is parsed into the document's structure model.
.PP
\fBParameters:\fP
.RS 4
\fItext\fP The string to be parsed into some structure in the document structure model.
.RE
.PP
\fBReturns:\fP
.RS 4
.RE
.PP
Definition at line 201 of file html_document.cpp.
.SS "void HTMLDocument::writeln (const \fBDOMString\fP & text)"
.PP
Write a string of text followed by a newline character to a document stream opened by \fC \fBopen()\fP \fP . The text is parsed into the document's structure model.
.PP
\fBParameters:\fP
.RS 4
\fItext\fP The string to be parsed into some structure in the document structure model.
.RE
.PP
\fBReturns:\fP
.RS 4
.RE
.PP
Definition at line 207 of file html_document.cpp.
.SS "\fBNodeList\fP HTMLDocument::getElementsByName (const \fBDOMString\fP & elementName)"
.PP
Returns the (possibly empty) collection of elements whose \fC name \fP value is given by \fC elementName \fP . \fBParameters:\fP
.RS 4
\fIelementName\fP The \fC name \fP attribute value for an element.
.RE
.PP
\fBReturns:\fP
.RS 4
The matching elements. 
.RE
.PP
Definition at line 213 of file html_document.cpp.
.SS "\fBDOMString\fP HTMLDocument::completeURL (const \fBDOMString\fP & url) const"
.PP
not part of the \fBDOM\fP converts the given (potentially relative) URL in a full-qualified one, using the baseURL / document URL for the missing parts. Definition at line 102 of file html_document.cpp.
.PP
References DOM::DOMString::string().
.SS "\fBDOMString\fP HTMLDocument::lastModified () const"
.PP
Not part of the \fBDOM\fP. The date the document was last modified. Definition at line 115 of file html_document.cpp.
.SS "\fBHTMLCollection\fP HTMLDocument::all () const"
.PP
Not part of the \fBDOM\fP. A collection of all the \fCIMG\fP, \fCOBJECT\fP, \fCAREA\fP, \fCA\fP, forms and anchor elements of a document. Definition at line 170 of file html_document.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for khtml Library from the source code.
