Re: [xml] Searching in reader API

On Sat, Feb 28, 2009 at 05:10:55PM +0530, divij wrote:
Hi All,
         Here I am having one large xml file having the entries (apprx
5000 records), the records also contain the UNICODE characters. Now, I
directly want to search that record (with the case of partial matching
also if possibles).
Is there any way in libxml/reader API to search specific record.
    <record>BBC News Monday</record>
    <record>BBC News Tuesday/record>
    <record>BBC News Wednesday</record>
    <record>BBC News Thusday</record>
    <record>BBC News Friday</record>
    <record>BBC News saturday</record>
Now if suppose I directly want to search the record BBC News Friday is
it possible to do by any which way in libxml.

  Don't use the reader, build a full tree instead and use XPath

  /record-set/record[. = "BBC News Friday"]

See etc.


Daniel Veillard      | libxml Gnome XML XSLT toolkit
daniel veillard com  | Rpmfind RPM search engine | virtualization library

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]