Internet Technologies:hrf

HTMLDocument() Professional

Super class

HRFTag()

Class function

HTMLDocument() 

Instantiation

:new( [<oParent>]        , ; 
[<cHTMLTag>]       , ; 
[<cHTMLAttributes>], ; 
[<cHTMLContent>]     ) --> oHTMLDocument 

Class methods

:loadFile( <cHTMLFileName> ) --> oHTMLDocument | NIL 

Reads a HTML file from disk and returns a HTMLDocument object reflecting the file. The object contains other HRF objects in its :childList()array reflecting the HTML tags in the HTML file.

Instance variables reflecting tag attributes

:anchors      | Array          READONLY 
:applets      | Array          READONLY 
:body         | oHTMLElement 
:cookie       | Character   
:domain       | Character      READONLY 
:forms        | Array          READONLY 
:images       | Array          READONLY 
:links        | Array          READONLY 
:referrer     | Character      READONLY 
:title        | Character   
:URL          | Character      READONLY 

Methods

:getElement( <cID>|<cName> ) --> oHTML | NIL 

The method accepts a string and scans the child-lists recursively for a child object with a matching "ID=" or "NAME=" attribute value. Either NIL or the first found object is returned.

:getElementById( <cID> ) --> oHTML | NIL 

The method accepts a string and scans the child-lists recursively for a child object with a matching "ID=" attribute value. Either NIL or the first found object is returned.

:getElementByName( <cName> ) --> oHTML | NIL 

The method accepts a string and scans the child-lists recursively for a child object with a matching "NAME=" attribute value. Either NIL or the found object is returned.

:getElementsByClassName( <cClass> ) --> aArray 

The method accepts a string and scans the child-lists recursively for all child objects with a matching value in the "CLASS=" attribute. All found objects are referenced in the array returned.

:getElementsByName( <cName> ) --> aArray 

The method accepts a string and scans the child-lists recursively for all child objects with a matching "NAME=" attribute value. All found objects are referenced in the array returned.

:saveFile( <cHTMLFileName>, [<nIndent>], [<cLineBreak>] ) --> lSuccess 

Stores the HTML code reflected by the object and its child objects in the file <cHTMLFileName>. The HTML code is formatted according to the passed parameters. <nIndent> is a numeric value specifying the number of spaces to be used as indentation for each nested level of child-list arrays (defaults to 1 space per level), and <cLineBreak>defines the character(s) to be used as line-end markers (defaults to Chr(13)+Chr(10)).

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.