\section{DOM::HTMLDocument Class Reference}
\label{classDOM_1_1HTMLDocument}\index{DOM::HTMLDocument@{DOM::HTMLDocument}}
An {\tt {\bf HTMLDocument}{\rm (p.\,\pageref{classDOM_1_1HTMLDocument})}} is the root of the HTML hierarchy and holds the entire content.  


{\tt \#include $<$html\_\-document.h$>$}

Inheritance diagram for DOM::HTMLDocument:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=77pt]{classDOM_1_1HTMLDocument__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for DOM::HTMLDocument:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=77pt]{classDOM_1_1HTMLDocument__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf HTMLDocument} ({\bf KHTMLView} $\ast$parent)
\item 
{\bf HTMLDocument} (const {\bf HTMLDocument} \&other)\label{classDOM_1_1HTMLDocument_a2}

\item 
{\bf HTMLDocument} (const {\bf Node} \&other)\label{classDOM_1_1HTMLDocument_a3}

\item 
{\bf HTMLDocument} \& {\bf operator=} (const {\bf HTMLDocument} \&other)\label{classDOM_1_1HTMLDocument_a4}

\item 
{\bf HTMLDocument} \& {\bf operator=} (const {\bf Node} \&other)\label{classDOM_1_1HTMLDocument_a5}

\item 
{\bf DOMString} {\bf title} () const 
\item 
void {\bf set\-Title} (const {\bf DOMString} \&)
\item 
{\bf DOMString} {\bf referrer} () const 
\item 
{\bf DOMString} {\bf domain} () const 
\item 
{\bf DOMString} {\bf URL} () const 
\item 
{\bf HTMLElement} {\bf body} () const 
\item 
void {\bf set\-Body} (const {\bf HTMLElement} \&)
\item 
{\bf HTMLCollection} {\bf images} () const 
\item 
{\bf HTMLCollection} {\bf applets} () const 
\item 
{\bf HTMLCollection} {\bf links} () const 
\item 
{\bf HTMLCollection} {\bf forms} () const 
\item 
{\bf HTMLCollection} {\bf layers} () const 
\item 
{\bf HTMLCollection} {\bf anchors} () const 
\item 
{\bf DOMString} {\bf cookie} () const 
\item 
void {\bf set\-Cookie} (const {\bf DOMString} \&)
\item 
void {\bf open} ()
\item 
void {\bf close} ()
\item 
void {\bf write} (const {\bf DOMString} \&text)
\item 
void {\bf writeln} (const {\bf DOMString} \&text)
\item 
{\bf Node\-List} {\bf get\-Elements\-By\-Name} (const {\bf DOMString} \&element\-Name)
\item 
{\bf DOMString} {\bf complete\-URL} (const {\bf DOMString} \&url) const 
\item 
{\bf DOMString} {\bf last\-Modified} () const 
\item 
{\bf HTMLCollection} {\bf all} () const 
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf HTMLDocument} (HTMLDocument\-Impl $\ast$impl)\label{classDOM_1_1HTMLDocument_b0}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf ::KHTMLView}\label{classDOM_1_1HTMLDocument_n0}

\item 
class {\bf ::KHTMLPart}\label{classDOM_1_1HTMLDocument_n1}

\item 
class {\bf DOMImplementation}\label{classDOM_1_1HTMLDocument_n2}

\end{CompactItemize}


\subsection{Detailed Description}
An {\tt {\bf HTMLDocument}{\rm (p.\,\pageref{classDOM_1_1HTMLDocument})}} 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.

The following properties have been deprecated in favor of the corresponding ones for the BODY element:

\begin{itemize}
\item {\tt alink\-Color} \end{itemize}
\begin{itemize}
\item {\tt background} \end{itemize}
\begin{itemize}
\item {\tt bg\-Color} \end{itemize}
\begin{itemize}
\item {\tt fg\-Color} \end{itemize}
\begin{itemize}
\item {\tt link\-Color} \end{itemize}
\begin{itemize}
\item {\tt vlink\-Color} \end{itemize}




Definition at line 73 of file html\_\-document.h.

\subsection{Constructor \& Destructor Documentation}
\index{DOM::HTMLDocument@{DOM::HTMLDocument}!HTMLDocument@{HTMLDocument}}
\index{HTMLDocument@{HTMLDocument}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}HTMLDocument::HTMLDocument ({\bf KHTMLView} $\ast$ {\em parent})}\label{classDOM_1_1HTMLDocument_a1}


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.

\subsection{Member Function Documentation}
\index{DOM::HTMLDocument@{DOM::HTMLDocument}!title@{title}}
\index{title@{title}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} HTMLDocument::title () const}\label{classDOM_1_1HTMLDocument_a7}


The title of a document as specified by the {\tt TITLE} element in the head of the document. 



Definition at line 84 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!setTitle@{setTitle}}
\index{setTitle@{setTitle}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void HTMLDocument::set\-Title (const {\bf DOMString} \&)}\label{classDOM_1_1HTMLDocument_a8}


see title 



Definition at line 90 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!referrer@{referrer}}
\index{referrer@{referrer}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} HTMLDocument::referrer () const}\label{classDOM_1_1HTMLDocument_a9}


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.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!domain@{domain}}
\index{domain@{domain}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} HTMLDocument::domain () const}\label{classDOM_1_1HTMLDocument_a10}


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.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!URL@{URL}}
\index{URL@{URL}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} HTMLDocument::URL () const}\label{classDOM_1_1HTMLDocument_a11}


The absolute URI of the document. 



Definition at line 121 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!body@{body}}
\index{body@{body}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf HTMLElement} HTMLDocument::body () const}\label{classDOM_1_1HTMLDocument_a12}


The element that contains the content for the document. 

In documents with {\tt BODY} contents, returns the {\tt BODY} element, and in frameset documents, this returns the outermost {\tt FRAMESET} element. 

Definition at line 127 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!setBody@{setBody}}
\index{setBody@{setBody}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void HTMLDocument::set\-Body (const {\bf HTMLElement} \&)}\label{classDOM_1_1HTMLDocument_a13}


see body 



Definition at line 133 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!images@{images}}
\index{images@{images}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf HTMLCollection} HTMLDocument::images () const}\label{classDOM_1_1HTMLDocument_a14}


A collection of all the {\tt IMG} elements in a document. 

The behavior is limited to {\tt IMG} elements for backwards compatibility. 

Definition at line 143 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!applets@{applets}}
\index{applets@{applets}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf HTMLCollection} HTMLDocument::applets () const}\label{classDOM_1_1HTMLDocument_a15}


A collection of all the {\tt OBJECT} elements that include applets and {\tt APPLET} ( deprecated ) elements in a document. 



Definition at line 149 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!links@{links}}
\index{links@{links}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf HTMLCollection} HTMLDocument::links () const}\label{classDOM_1_1HTMLDocument_a16}


A collection of all {\tt AREA} elements and anchor ( {\tt A} ) elements in a document with a value for the {\tt href} attribute. 



Definition at line 155 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!forms@{forms}}
\index{forms@{forms}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf HTMLCollection} HTMLDocument::forms () const}\label{classDOM_1_1HTMLDocument_a17}


A collection of all the forms of a document. 



Definition at line 161 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!layers@{layers}}
\index{layers@{layers}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf HTMLCollection} HTMLDocument::layers () const}\label{classDOM_1_1HTMLDocument_a18}


A collection of all the layers of a document. 



Definition at line 167 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!anchors@{anchors}}
\index{anchors@{anchors}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf HTMLCollection} HTMLDocument::anchors () const}\label{classDOM_1_1HTMLDocument_a19}


A collection of all the anchor ( {\tt A} ) elements in a document with a value for the {\tt name} attribute. 

Note. For reasons of backwards compatibility, the returned set of anchors only contains those anchors created with the {\tt name} attribute, not those created with the {\tt id} attribute. 

Definition at line 173 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!cookie@{cookie}}
\index{cookie@{cookie}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} HTMLDocument::cookie () const}\label{classDOM_1_1HTMLDocument_a20}


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 \char`\"{}name, value\char`\"{} pairs for all the cookies associated with the page. For example, {\tt name=value};expires=date . 

Definition at line 185 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!setCookie@{setCookie}}
\index{setCookie@{setCookie}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void HTMLDocument::set\-Cookie (const {\bf DOMString} \&)}\label{classDOM_1_1HTMLDocument_a21}


see cookie 



Definition at line 191 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!open@{open}}
\index{open@{open}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void HTMLDocument::open ()}\label{classDOM_1_1HTMLDocument_a22}


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.

\begin{Desc}
\item[Returns:]\end{Desc}


Definition at line 198 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!close@{close}}
\index{close@{close}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void HTMLDocument::close ()}\label{classDOM_1_1HTMLDocument_a23}


Closes a document stream opened by {\tt {\bf open()}{\rm (p.\,\pageref{classDOM_1_1HTMLDocument_a22})}} and forces rendering. 

\begin{Desc}
\item[Returns:]\end{Desc}


Definition at line 204 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!write@{write}}
\index{write@{write}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void HTMLDocument::write (const {\bf DOMString} \& {\em text})}\label{classDOM_1_1HTMLDocument_a24}


Write a string of text to a document stream opened by {\tt {\bf open()}{\rm (p.\,\pageref{classDOM_1_1HTMLDocument_a22})}} . 

The text is parsed into the document's structure model.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]The string to be parsed into some structure in the document structure model.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]\end{Desc}


Definition at line 210 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!writeln@{writeln}}
\index{writeln@{writeln}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void HTMLDocument::writeln (const {\bf DOMString} \& {\em text})}\label{classDOM_1_1HTMLDocument_a25}


Write a string of text followed by a newline character to a document stream opened by {\tt {\bf open()}{\rm (p.\,\pageref{classDOM_1_1HTMLDocument_a22})}} . 

The text is parsed into the document's structure model.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]The string to be parsed into some structure in the document structure model.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]\end{Desc}


Definition at line 216 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!getElementsByName@{getElementsByName}}
\index{getElementsByName@{getElementsByName}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Node\-List} HTMLDocument::get\-Elements\-By\-Name (const {\bf DOMString} \& {\em element\-Name})}\label{classDOM_1_1HTMLDocument_a26}


Returns the (possibly empty) collection of elements whose {\tt name} value is given by {\tt element\-Name} . 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em element\-Name}]The {\tt name} attribute value for an element.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The matching elements. \end{Desc}


Definition at line 222 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!completeURL@{completeURL}}
\index{completeURL@{completeURL}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} HTMLDocument::complete\-URL (const {\bf DOMString} \& {\em url}) const}\label{classDOM_1_1HTMLDocument_a27}


not part of the {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} 

converts the given (potentially relative) URL in a full-qualified one, using the base\-URL / document URL for the missing parts. 

Definition at line 102 of file html\_\-document.cpp.

References DOM::DOMString::string().\index{DOM::HTMLDocument@{DOM::HTMLDocument}!lastModified@{lastModified}}
\index{lastModified@{lastModified}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} HTMLDocument::last\-Modified () const}\label{classDOM_1_1HTMLDocument_a28}


Not part of the {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})}. 

The date the document was last modified. 

Definition at line 115 of file html\_\-document.cpp.\index{DOM::HTMLDocument@{DOM::HTMLDocument}!all@{all}}
\index{all@{all}!DOM::HTMLDocument@{DOM::HTMLDocument}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf HTMLCollection} HTMLDocument::all () const}\label{classDOM_1_1HTMLDocument_a29}


Not part of the {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})}. 

A collection of all the {\tt IMG}, {\tt OBJECT}, {\tt AREA}, {\tt A}, forms and anchor elements of a document. 

Definition at line 179 of file html\_\-document.cpp.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
html\_\-document.h\item 
html\_\-document.cpp\end{CompactItemize}
