xHarbour Reference Documentation > Class Reference (textmode) xHarbour Developers Network  

THtmlIteratorRegEx()

Creates a new THtmlIteratorRegEx object.

Syntax

THtmlIteratorRegEx():new( <oTHtmlNode> ) --> oTHtmlIteratorRegEx

Arguments

<oTHtmlNode>
This is a THtmlNode() object to create the iterator object for. It serves as starting node for iterating.

Return

The function returns a THtmlIteratorRegEx object and method :new() initializes it.

Description

The THtmlIteratorRegEx class is derived from the THtmlIterator() class and has the same methods. The only difference is that regular expressions are used to define search criteria for finding a particular HTML node in an HTML tree. The regular expressions are defined once with the :find() method, which searches for the first matching HTML node. Subsequent HTML nodes matching the regular expressions are then searched with the :next() method.

The end of a search is indicated when either :find() or :next() return NIL instead of a THtmlNode object matching the regular expressions.

Search methods

:find( ... ) --> oTHtmlNode | NIL
Searches the first HTML node matching the regular expressions.
:next() --> oTHtmlNode | NIL
Searches the next HTML node matching the regular expressions.

Info

See also:THtmlDocument(), THtmlNode(), THtmlIterator(), THtmlIteratorScan()
Category: HTML functions , Object functions , xHarbour extensions
Source:tip\thtml.prg
LIB:xhb.lib
DLL:xhbdll.dll


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