PDA

View Full Version : How to search for string in dataset?


jakeh
09-02-2004, 10:39 AM
Is there any way to search for a string within the text of my dataset and return pointers to the nodes that match?

Note: I dont want to search for exact matches.

Example:

I want to search for "fra" (case insensitive)

and match to

<myxml>
<mynode>
<myitem>Frank</myitem> <---match here
<myitem>James</myitem>
<myitem>Jerome</myitem>
<myitem>Gerald</myitem>
</mynode>
</myxml>

antun
09-02-2004, 10:45 AM
Yes, you could use a datapointer with a drill-down method that navigated through all the nodes in the dataset, checked their text nodes, and returned itself if a match was found.

-Antun

jakeh
09-02-2004, 10:54 AM
what is the method to search for a string but not have an exact match? I have seen examples for exact match.. but no 'contains' method.