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

oTXmlDocument:findFirstRegEx()

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

Syntax

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

Arguments

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

Description

Method :findFirstRegEx() locates the first XML node in the XML tree that matches the regular expressions passed. If no parameter is passed, the first XML 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