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. > > Example:- > > <record-set> > <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> > </record-set> > > 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 http://www.w3.org/TR/xpath#path-abbrev etc. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ [email protected] | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
