THtmlDocument() > Methods for searching and navigating xHarbour Developers Network  

oTHtmlDocument:findFirstRegex()

Locates the first HTML node containing particular data using regular expressions.

Syntax

:findFirstRegEx( [<cTagNameRegEx>]        , ;
                 [<cAttributeNameRegEx>]  , ;
                 [<cAttributeValueRegEx>] , ;
                 [<cDataRegEx>]             ) --> oTHtmlNode | NIL

Arguments

<cTagNameRegEx>
This is a character string holding the regular expression to match with name of the HTML node to find.
<cAttributeNameRegEx>
This is a character string holding the regular expression to match with the name of an attribute of the HTML node to find.
<cAttributeValueRegEx>
This is a character string holding the regular expression to match with the value of the attribute of the HTML node to find.
<cDataRegEx>
This is a character string holding the regular expression to match with the textual content of the HTML node to find.

Description

Method :findFirstRegEx() locates the first HTML node in the HTML document that matches the regular expressions passed. If no parameter is passed, the first HTML node in the tree is returned. Search criteria can be any combination of name, attribute and textual content. If no matching node is found, the return value is NIL.

If a matching node is found, the next node matching the same search criteria is returned from method :findNext().


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe